CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003

    fast opengl redrawing

    I have an app that creates an opengl dialog box similar to the one found in "How to Create a CHILD OpenGL Window in a Dialog" (which can be found in the opengl section of this website). This app redraws the opengl window by doing a call to InvalidateRect().

    However, when i put it together with the main app, (which is also running opengl) my frame rate of the main app drops from 35 fps to 2 fps even though the dialog box opengl window is not doing anything (i just call a glClearBuffer()). i think that the InvalidateRect() is slowing down the frame rate, because if i remove it the code speeds back up.

    Is there anyway to force a redraw of the opengl window without having to reduce the frame rate to 2 fps?


  2. #2
    Join Date
    Sep 2003

    Question anyone?

    does anyone know how to do this? it's just that doing

    or invalidateRect() seems to slow everything down tremendously!

    thanks in advance...

  3. #3
    Join Date
    Sep 2003
    So Cal
    You might want to try Invalidate with the redraw paramter set to false. This should speed things up a little.

    From MSDN

    void Invalidate( BOOL bErase = TRUE );



    Specifies whether the background within the update region is to be erased.

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)