[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]

/agdg/ - Amateur Game Development General

AGDG - The Board
Name
Email
Subject
REC
STOP
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options
dicesidesmodifier

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov, swf, pdf
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


Welcome to AGDG, keep working on your game anon!
See also: /ideaguy/ | /vm/

File: f0b1b2329440bc5⋯.png (2.96 MB,3564x4384,891:1096,opengl.png)

ead8a1 No.31975

Let's say I have two uniform blocks defined in my shader, call them A and B.

In my program code I generate the name and create data store for each one using

something like:

glGenBuffers(1, &buffer);

glBindBuffer(GL_UNIFORM_BUFFER, buffer);

glBufferData(GL_UNIFORM_BUFFER, bufferSize, nullptr, GL_STATIC_DRAW);

I then bind each one with: glBindBufferBase(GL_UNIFORM_BUFFER, bindingPoint, buffer);

and set the block bindings in shader: glUniformBlockBinding(handle, UBOindex, bindingPoint);

Now it's time to update the buffer data. I call glBufferSubData(GL_UNIFORM_BUFFER, offset, size, data).

Since two UBOs are bound and the above call does not accept binding point I have

no idea what will happen. Can anyone help?

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.


[Return][Go to top][Catalog][Nerve Center][Random][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]