Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. OpenGL Fast Redrawing

OpenGL Fast Redrawing

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsquestiongame-devworkspace
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Using OpenGl I have spent some time trying to devise a method of using what is already in the front buffer (in a double buffered context) for fast redraws. This is useful when the window has finished rendering (maybe waiting for further user input) and a redraw message is sent to the application for some other reason (maybe the user has moved the window). It is a waste of time performing a full render because the final image will be identical to that prior to the redraw. And if the redraw is lengthy then the user cannot do anything until the redraw has finished (which could become annoying to the user). I have tried using glFlush()/glFinish() instead of swapbuffers() and this appears to work on the generic implementation, but with a Voodoo 3500 it doesn't work (who knows what they do with the front and back buffers). I do not want to use extensions that may not exist in a generic implementation or accelerated environment (PFD_SWAP_COPY, AUX buffer etc). I have also tried rendering to a bitmap then using BitBlt() in a single buffer context, but this is incredibly slow. What can I do?

    P 1 Reply Last reply
    0
    • L Lost User

      Using OpenGl I have spent some time trying to devise a method of using what is already in the front buffer (in a double buffered context) for fast redraws. This is useful when the window has finished rendering (maybe waiting for further user input) and a redraw message is sent to the application for some other reason (maybe the user has moved the window). It is a waste of time performing a full render because the final image will be identical to that prior to the redraw. And if the redraw is lengthy then the user cannot do anything until the redraw has finished (which could become annoying to the user). I have tried using glFlush()/glFinish() instead of swapbuffers() and this appears to work on the generic implementation, but with a Voodoo 3500 it doesn't work (who knows what they do with the front and back buffers). I do not want to use extensions that may not exist in a generic implementation or accelerated environment (PFD_SWAP_COPY, AUX buffer etc). I have also tried rendering to a bitmap then using BitBlt() in a single buffer context, but this is incredibly slow. What can I do?

      P Offline
      P Offline
      Philip Nicoletti
      wrote on last edited by
      #2

      A few suggestions : 1) have you tried glReadPixels() / glDrawPixels() ? 2) The accumulation buffer is guaranteed to exist in all openGL implementations ... maybe you can use it somehow ? What "windowing" system are you using ? AUX ? GLUT ? wgl ?

      L 1 Reply Last reply
      0
      • P Philip Nicoletti

        A few suggestions : 1) have you tried glReadPixels() / glDrawPixels() ? 2) The accumulation buffer is guaranteed to exist in all openGL implementations ... maybe you can use it somehow ? What "windowing" system are you using ? AUX ? GLUT ? wgl ?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Thanks for the suggestions. Your suggestion to use the accumulator seems to work. It is still a little slow, but at least it is a constant redraw time for a set screen size. This means that I should be able to do some dynamic calculations in software and when the redrawing using normal rendering takes too long I could switch to the accumulator buffer method (for the next redraw of course).

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups