Hi,
I have generated a texture of my scene with pBuffer. I would like to create different resolutions of this texure (as mipmaps) to get blured textures and to use it with a glBindTexture(). Does someone has an idea to create this ?
Thanks
Here is an excerpt from the code I used :
const int pbufferAttributes [50] = {
// WGL_TEXTURE_FORMAT_ARB,WGL_TEXTURE_RGBA_ARB,
WGL_TEXTURE_FORMAT_ARB,WGL_TEXTURE_RGB_ARB, // use it only for RenderToTexture, not ctsi
WGL_TEXTURE_TARGET_ARB,WGL_TEXTURE_2D_ARB , // use it only for RenderToTexture, not ctsi
WGL_MIPMAP_TEXTURE_ARB,TRUE, // to have nice and fast mipmaps
0
};
pbuffer = wglCreatePbufferARB(hDC,
pixelformats[0],
pwidth,
pheight,
pbufferAttributes);
Then play with texture lod to select the level you want :
http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_lod_bias.txt
But to my experience, the visual quality is not so good. Using mutitexturing to have 4 slightly moved copies of the same texture may improve it.
thanks for your answer.
It works fine!!!