[Qt-interest] Please help design a Qt framework for OpenGL

Joe Liu passer.by007gg at gmail.com
Tue Feb 2 12:51:16 CET 2010


Or, are there any samples to demonstrate how to use QEventLoop?

Thanks

2010/2/1 Joe Liu <passer.by007gg at gmail.com>

> Hi,
>
> I know it's quite convenient to use QGLWidget to write your OpenGL app
> within Qt;
>
> However, my issue is to make a framework to do more control on FPS of
> OpenGL Rendering by, maybe, utilizing QEventLoop;
>
> We might use the following framework on plain Win32 APIs in an OpenGL app:
> -----------------
> int main()
> {
>     //init Window and OpenGL
>
>     Messageloop
>     {
>        * if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
>         {
>             TranslateMessage(&msg);
>             DispatchMessage(&msg);
>         }
>         else
>         {
>             // I can query system time to help control the FPS
>             sysTime = timeGetTIme();
>             if( sysTime - lastTime > 30 )
>             {
>                 DrawGLScene();
>                 lastTime = sysTime;
>             }
>         }*
>     }
> }
> -----------------
>
> I think in Qt, maybe I need to use QEventLoop to control the message by
> myself;
> But I dont find useful docs or samples about the usage of QEventLoop, or
> about controlling FPS;
>
> Do you have any suggestions? Thanks a lot;
>
> Cheers,
>
>
> Joe
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100202/9b91c4e8/attachment.html 


More information about the Qt-interest-old mailing list