Saving Images bigger than vieport

Hello everyone,
I am need of an application that will create simulated images…What i mean by that? Well i am writing a camera simulator which will also create “virtual” images.

Now this is where the problem arise (probably due to my lack of OpenGl knowledge :stuck_out_tongue: ). If we simulate various camera models the images that they create are different.
For example it can be imagewidth=3264 imageheight=2448 or maybe imagewidth=3072 imageheight=2304 etc…

Normally i would like to have a Viewport like the pixel sizes of the CCDarray of the cameras but this cant happen i guess. So i can scale it i guess but when i grab pictures (screen grab) i would like to have the exact pixel sizes that i want ?

Can you please provide me with some information to read on how to do that ?

It all depends on the hardware plaforms you’re using/planning to use: modern consumer level hardware can render directly to viewports up to 4096x4096 or even 8192x8192.

If you have needs for bigger images, or hardware constraints, you can opt for tile rendering : split your destination image in tiles of smaller size, render multiple times with an offset in projection matrix, and composite the tiles to create the full image.

HTH, regards.

Mhm hardware is not a problem to be honest.

But i still dont get it ! glReadPixels can only read the rendered scene on the screen and from my understanding nothing else is actually rendered out of the Frustrum. So even if i set coords bigger than the screen size it wont actually make a difference as they are not rendered !

I know that i can probably use the Framebuffer right ? but i am not familiar yet with it even though i know i use it already !

So any info on how to render and save what i render to files(i already know in a way how to do it but maybethere is a better way than glreadpixels and glDrawPixels…maybe glCopyPixels ?) would would be more than appreciated ! Also there is the limitation that the size have to be a power of 2 or i am mistaken ? Cause camera’s CCD arrays for sure dont have a power of 2 pixel size sensor

Thank you in advance !

http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=249629#Post249629
Use FBO (framebuffer object) extension.