When I have the debug layer on with OpenGL, I register a callback, that gets called whenever there's anything of note to tell me. It seems not all the messages that are passed to the callback are errors. There's an "OTHER" category, and it seems it outputs these messages whenever you've done something. In my case I create a VBO with:
GLuint VBO_ID;
glGenBuffers(1, &VBO_ID); // The VBO_ID I get back is 3.
glBindBuffer(GL_ARRAY_BUFFER, VBO_ID);
glBufferData(GL_ARRAY_BUFFER, sizeInBytes, vertices, GL_DYNAMIC_COPY);
// At this point the callback is called, which gives the message:
message: Buffer detailed info: Buffer object 3 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
No matter what the usage hint (last argument of glBufferData), this message ALWAYS says the usage hint is GL_STATIC_DRAW
. No matter whether I use GL_DYNAMIC_COPY
, GL_DYNAMIC_DRAW
, GL_STATIC_READ
, anything. The message is always the same.
So yeah, I'm really confused about this. Also why does it give this message, it's not a warning as I haven't done anything wrong, it's just a confirmation. I've ended disabling this "OTHER" category of messages otherwise my log just gets filled with these, because it's called whenever I do something.
Don't worry about that constant, just put GL_STATIC_DRAW. Its leftover from old GL versions. You can also use glBufferStorage where you can more precisely specify buffer usage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With