fast opengl redrawing
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: fast opengl redrawing

  1. #1
    Join Date
    Sep 2003
    Posts
    23

    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?

    thanks!

  2. #2
    Join Date
    Sep 2003
    Posts
    23

    Question anyone?

    does anyone know how to do this? it's just that doing
    this->Invalidate()

    or invalidateRect() seems to slow everything down tremendously!

    thanks in advance...

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

    From MSDN

    CWnd::Invalidate
    void Invalidate( BOOL bErase = TRUE );

    Parameters

    bErase

    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

This is a CodeGuru survey question.


Featured


HTML5 Development Center