Uploading many (or large) textures is typically an expensive operation because of the amount of data being pushed to the GPU. The swapping thread should then call doneCurrent() and notify the main thread that it has finished. You would then notify the swapping thread that you have finished rendering and it would call makeCurrent() to make the context active and then call swapBuffers(). In practice you would render everything as normal in your main thread, but instead of calling swapBuffers(), you would call doneCurrent() on the current GL context. The solution to this in 4.8 is to have a separate thread whose sole purpose in life is to wait for the GPU by calling swapBuffers. For example, it could return to the event loop and process some user input, network traffic or advance the next scene of an animation. That’s unfortunate because your current thread has much better things to do than wait for the GPU. If this operation is synchronous then your main thread is blocked while the GPU is doing its thing. In many cases, this is the function that tells the GPU to take all of your render commands and execute them to render the current frame. Here are some interesting details about how OpenGL is used in Qt 4.8.0:ĭepending on your driver and GPU, the call to swapBuffers() can sometimes be an expensive function call (especially on embedded processors). You can download Qt 4.8.0 from this page.Īmong the new features, there is the threaded OpenGL support. Qt, the cross-platform (Windows, Linux, Mac OS X) application and UI (user interface) framework, is available in version 4.8.0.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |