Results 1 to 3 of 3

Thread: Refresh the view without re-rendering?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2002
    Posts
    365

    Refresh the view without re-rendering?

    I have an event-based app. I want to swap the buffer any time the window gets covered up by another window. Nothing has changed. If I continually swap the buffers, the screen goes gray. Is there a way to refresh the front buffer without clearing the back buffer, so I can just keep refreshing it without having to redraw?

    Instead of this:
    Render
    Swap
    Repeat

    Just this:
    Swap
    Repeat

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: Refresh the view without re-rendering?

    No, unless you render to a pbuffer or some other off screen buffer and do the update yourself.

  3. #3
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: Refresh the view without re-rendering?

    What he said ^^^.
    Only swapping to refresh is inherently wrong for a PFD_SWAP_EXCHANGE pixelformat and will fail in many implementations because the update has to be done like any other WM_PAINT handling to be correct.
    All window expose messages need to repaint the area previously failing the pixel ownership test (overlapped by a window or moved off the desktop) or the data in all buffers (including front, back, depth, stencil, ...) of the pixel is undefined!

Similar Threads

  1. 2D Rendering & View Movement
    By mcindafizzy in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-20-2011, 02:10 PM
  2. OpenGL - game, NOT rendering objects, not in view.
    By BerlinBrown in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-16-2009, 06:52 PM
  3. volume rendering, view-aligned 3d textures.
    By torisutan in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 04-14-2007, 06:18 PM
  4. Rendering the weapon in the first person view.
    By lgc_ustc in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-08-2004, 04:04 AM
  5. rendering GL view to a bitmap to create a thumbnail
    By mcsellski in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-21-2002, 08:07 AM

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