Hello there,
I encountered something weird (for me). I made a small app where I want to pass an OpenGLTexture as a sampler2D-Uniform to my shaderProgram.
I'm doing this as follows in the renderOpenGL() function:
openGLTexture.bind(); GLint texID = openGLTexture.getTextureID(); texUniform->set( texID );
So when I use the identifier "texID" the texture is not passed to the shader. "texID" equals 1.
When I do it like this:
openGLTexture.bind(); texUniform->set( 0 );
it works.
Why is that so? Could someone enlighten me please?