glTexImage2D with sized internal format

Calling:

glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, data )

works as expected. No OGL errors (using debug context). However-

glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8UI, w, h, 0, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE, data )

Debug context reports no errors. However the texture is never loaded. It appears to have all 0’s in it. Why would this be the case?

NVIDIA RTX 2080 TI Driver Version: 496.49

You cannot write a single shader that works for both of these images. Either the sampler is sampler2D (and thus works for the first) or usampler2D (and thus works for the second). So what is your shader(s) doing?

Nice! That was indeed the problem. Much appreciation!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.