I want to use a special custom algorithm to create mipmaps for some rendered textures (R16F and RGBA16F).
Mikmaps of all necessary textures are pre-activated using glGenerateMipmapEXT ().
The biggest problem so far is rendering in 1+ mipmap levels.
More precisely, it works like a charm:
...
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, target, texType, texId, 0 );
checkFBOStatus();
...
render();
But this gives me 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 the code is the lod level parameter for attaching the texture to the FBO.
after many febrile scratches on my head, I still can't get it to work. So any answer is welcome.
[NOTE: target OpenGL 2.x platform with FBO extension]