glCopyTexImage2D

Hi Guys,

Is it true that this function works with dimension up to viewport size and never above 512x512?

Thanks,

Alberto

Not quite.

It is true, that it is limited to the viewport size. You cannot render outside the viewport, therefore you cannot copy data from outside the viewport.

However there is no 512^2 limit. The only other limit is the maximum texture-size, which WAS 512 on some old hardware, but today it is usually 4096 or even higher.

HOWEVER, if you want to copy a square texture (a usual case) you are of course limited by the lower value of the viewport in x or y direction. That is usually the y direction. And since resolutions of (some_x, 1024+) are not a standard one can usually assume, you are indeed often limited to 512^2 sized textures.

The obvious solution to prevent all those problems, is to use FBOs. Of course this is only a solution, if you can assume that your customers do have appropriate hardware and drivers.

Hope that helps,
Jan.

Hi Jan,

I know about FBO, but this approach is for machines where FBO are not present.

Thanks,

Alberto