Results 1 to 9 of 9

Thread: Flip entire framebuffer upside down?

  1. #1
    Member Contributor
    Join Date
    Jul 2002
    Location
    Southampton, PA, USA
    Posts
    61

    Flip entire framebuffer upside down?

    Subject says what I need to do...systematically do a vertical flip of everything in the framebuffer right before it is displayed onscreen.

    Flipping just the geometry (glPixelZoom, etc.) will not work in this application (don't ask).

  2. #2
    Senior Member Regular Contributor
    Join Date
    May 2002
    Location
    York, UK
    Posts
    128

    Re: Flip entire framebuffer upside down?

    OK, I won't ask

    glMatrixMode(GL_PROJECTION);
    glRotatef(180.0,0.0,0.0,1.0);
    glMatrixMode(GL_MODELVIEW);

    or similar, possibly???

    R.

  3. #3
    Member Contributor
    Join Date
    Jul 2002
    Location
    Southampton, PA, USA
    Posts
    61

    Re: Flip entire framebuffer upside down?

    Doesn't work.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    184

    Re: Flip entire framebuffer upside down?

    turn the monitor upside down

    b

  5. #5
    Member Contributor
    Join Date
    Jul 2002
    Location
    Southampton, PA, USA
    Posts
    61

    Re: Flip entire framebuffer upside down?

    actually, that's exactly what i'm doing

  6. #6
    Member Contributor
    Join Date
    Jul 2002
    Location
    Southampton, PA, USA
    Posts
    61

    Re: Flip entire framebuffer upside down?

    Any other suggestions on how to do this without moving the monitor or standing on my head?

  7. #7
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    380

    Re: Flip entire framebuffer upside down?

    you could render to a texture or copy the framebuffer to a texture then draw a quad with that as its texture across the entire screen

  8. #8
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Flip entire framebuffer upside down?

    Since you say you want a flip, not a rotate, I would guess glScalef(1.0, -1.0, 1.0) would be more appropriate. I wouldn't put it in the projection matrix, though. You can mess up lighting/fog calculations. Do that before any "Camera" transformations like gluLookAt()
    Deiussum
    Software Engineer and OpenGL enthusiast

  9. #9
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Re: Flip entire framebuffer upside down?

    WHy not just swap the signs on the top/bottom parameters when you create your frustum?

Similar Threads

  1. How do I flip upside down fonts in FTGL
    By mr5zzz in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-01-2014, 07:39 AM
  2. flip pdf pages
    By humbert in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-17-2004, 01:34 PM
  3. Flip entire framebuffer upside down?
    By Jared@ETC in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 07-29-2002, 03:04 AM
  4. how to copy ENTIRE framebuffer into a texture ??
    By haust in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 03-03-2002, 06:20 AM
  5. Page Flip
    By Humus in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 04-04-2001, 09:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean