Reputation: 727
Anyone know how to render to specific mip-level texture?
Currently I am binding the mip-level texture by:
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D, textID, mip-level);
Then later in my code, I will do something like this:
glBindFramebuffer(GL_FRAMEBUFFER, FBO_ID);
drawArrays(...);
But I the shader is not executed!!!
Upvotes: 1
Views: 329
Reputation: 43359
If textID is anything other than 0, this should be generating a GL_INVALID_VALUE
error.
GL_INVALID_VALUE
is generated if level is not 0 and texture is not 0.I suggest you take a look at glFramebufferTexture2D
for OpenGL ES. It is valid to do what you want in normal OpenGL but not in OpenGL ES :-\
Upvotes: 1