glCopyTexImage2D Problem -> Texture to copy bigger than frame buffer

I’m copying the content of the frame buffer to a texture. But when the size of my window is getting smaller then the texture I want to capture, then I get only the size of the frame buffer captures. But I set the glViewport to my texture size. Is there any possibility to work around this.

If not, then I maybe have to adjust the size of the captures texture to the size of the framebuffer.
Or maybe open a second render context to render the texture…

Kilam.

Yes, those are the two alternatives.

Also beware that when you’re NOT in full-screen mode, the framebuffer for any part of your window that is hidden behind other windows contains undefined bits (which may or may not be the bits you want).

Couldn’t you just make the texture smaller with the window? The texture resolution wouldn’t be what you might want, but you wouldn’t need to setup another context (for a P-Buffer) and render twice.

I suggest you take a look at WGL_ARB_render_texture.

Thanks for you replies!

As I want to run my program in software mode too, I think I cant use the WGL_ARB_RENDER_TEXTURE extension.

So I will resize the texture.

Kilam.