i want use a specific customized algorithm to generate mipmaps for some renderable textures (R16F & RGBA16F).
All needed textures' mipmaps are pre-enabled by using glGenerateMipmapEXT().
The biggest problem so far is to render into 1+ mipmap levels. More precisely, this works like a charm:
...
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, target, texType, texId, 0 );
checkFBOStatus();
...
render();
But this gives me a GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT when checking fbo status
...
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, target, texType, texId, 1 );
checkFBOStatus();
...
render();
All the difference in code is the lod level parameter for attaching a texture onto the FBO.
after lots of feverish head-scratching, i still cant get it work. So, any answer is greatly appreciated.
[NOTE: target platform is OpenGL 2.x with FBO extension]