[ / / / / / / / / / / / / / ] [ r8k / ck / wooo / fit / random / britfeel / fit / furry / imouto / m / monster / sw / turul ][Options][ watchlist ]

/agdg/ - Amateur Game Development General

AGDG - The Board
You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.

Name
Email
Subject
REC

0:00

Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Expand all images

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

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

[–]

ead8a1 (1) No.31975 [Watch Thread][Show All Posts]

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][Screencap][Nerve Center][Random][Update] ( Scroll to new posts) ( Auto) 5
0 replies | 0 images | 1 UIDs | Page 7
[Post a Reply]
[ / / / / / / / / / / / / / ] [ r8k / ck / wooo / fit / random / britfeel / fit / furry / imouto / m / monster / sw / turul ][ watchlist ]