GPU Generation Mipmap Guide [OpenGL 2.x]

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]

+3
2

SOLVED


FBO ​​ . glGenerateMipmapEXT/glGenerateMipmap, u , VALID DATA; .

:

  • TexImage TexSubImage glGenerateMipmap

  • FBO glGenerateMipmap

( GF8, GF9) ATI.

, - ATI.

PS. Pls , .

+2

, ATI Radeon 9800. gltexImage2D.

, . , FBO.

0

Source: https://habr.com/ru/post/1732855/


All Articles