Using Qt for only making a window to quickly render opengl inside of

I am interested with experimenting with Opengl on Windows 7. My concern is that because Qt is more designed for applications that may have a complex GUI and other things that are not exactly game related, it is not suitable for high performance 3d graphics.

My intention is to use Qt ONLY for creating a window, than I will only use Opengl calls to create my graphics. Using this method, will an Opengl program using a window created with Qt have very similar performance to a window created using the win32 api? Should I just use SDL instead? I only want a nice, easy, cross-platform way to create a window that I can "put my own opengl stuff" inside of. I may also want to use it to receive keyboard and mouse events.

PS GLUT seems a little dated, so I wanted to use something new.


The main problem with using Qt for making a game isn't that Qt is generally for writing applications. That won't affect OpenGL at all. It's that Qt isn't designed for all of the other things you might need a game to do. Input, sound (not the kind of sound that Qt does), etc.

Your knowledge of tools that can be used to create OpenGL windows seems rather limited. You should investigate some of the alternatives.

FreeGLUT is good for making demo applications. I would always suggest having this in your general set of tools, if for no other reason than to make proof-of-concept applications. When proving a graphical effect, it's best to do it in a limited, controlled environment first, and then transport it into your real application.

GLFW is good, as it also has facilities for input (joysticks, etc). But it, like FreeGLUT, has no way to get a HWND (or other kinds of platform-specific window objects), so manually attaching sound tools to them are a bit more difficult.

SDL, SFML, and Allegro 5 are all designed specifically for game-type applications. They offer a full range of input, sound, and other tools. Which one you choose to use is up to you, but these are most likely to be your best options.

链接地址: http://www.djcxy.com/p/38438.html

上一篇: 线程与glut:glutPostRedisplay被忽略

下一篇: 使用Qt来创建一个窗口来快速渲染opengl