Sign in to follow this  

OpenGL Issues with new DSA functions in OpenGL 4.5

Recommended Posts

Here is the code which seems to be problematic:

GLuint texture = 0;

glCreateTextures(GL_TEXTURE_2D, 1, &texture);
glTextureStorage2D(texture, 10, GL_RGBA8, 512, 512);
glTextureSubImage2D(texture, 0, 0, 0, 512, 512, GL_RGBA, GL_UNSIGNED_BYTE, image_buffer);
glBindTextureUnit(GL_TEXTURE0, texture);

Here is the output I am getting:

OpenGL debug: GL_INVALID_VALUE error generated. <unit> must be less than the number of combined texture image units.
OpenGL debug: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size.
Edited by Chris_F

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this