Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Saving Images bigger than vieport

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    2

    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 :P ). 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 ?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    France
    Posts
    193

    Re: Saving Images bigger than vieport

    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.

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    2

    Re: Saving Images bigger than vieport

    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 !

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Saving Images bigger than vieport

    http://www.opengl.org/discussion_boa...629#Post249629
    Use FBO (framebuffer object) extension.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •