How and Where to start to build a game using Qt
-
[quote author="Dinesh Balu" date="1305725722"]
You mean we can use the OpenGL libraries that we use with Visual Studio ( the dlls and headers ).
[/quote]Actually, it's difference between OpenGL in Windows(which Qt use Mesa, one implementation of OpenGL standards) and OpenGL ES in Symbian.
And talking about Windows, you just need add "opengl" to .pro file, then use it with QGLWidget. And for simple OpenGL game with QML in both Windows and Symbian, you can try "Qt3D" at "Qt3D Gitorious":git://gitorious.org/qt-labs/qt3d.git.
-
Qt uses whatever OpenGL implementation is on your system. Qt does not provide it's own OpenGL implementation at all. Commonly, OpenGL implementations are provided by yoru graphics card vendor and are installed along with the other driver components.
If the vendor does not provide a hardware accelerated implementation of OpenGL then it is possible to use a completle ysoftware based version such as mesa although this will of course not be as fast.
To you OpenGL with Qt take a look at the QGLWidget class.
-
Thanks Chuck.Gao and ZapB...
I tried to run the 5 in a row game given by Qt and I'm getting this error
bq. Cannot open include file :'QGLWidget' No such file or directory
does the QtOpenGL module libraries come with the Qt SDK or we have to include like a plugin...
I'm using Nokia's Qt Creator 2.0.1 - Based on Qt 4.7.0 (32 bit)
-
You need to add:
@
QT += opengl
@to your .pro file and re-run qmake if you wish to use OpenGL. This tells qmake to append the necessary include and library search paths to the generated Makefiles.
I've not looked at the example to see if this does so or even needs OpenGL.
-
Thanks ZapB... It worked.....
but it now shows multiple errors in 'gl.h'...one that is
bq. syntax error: 'void' should be preceeded by ';'
when I checked this error... it points to this line in gl.h
bq. WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);
-
I got this project from this link:
"5 in a row":http://quitcoding.com/?page=work#5inarowget the source code tar.gz file of the title 5 in a row
-
It depends on the complexity of the game.
For your game, I would recommend QML. Do you need to learn Qt/C++ for your class though?Here is a QML game that uses 'levels' so you can see how transitions work:
http://qt-apps.org/content/show.php?content=134799