PDA

View Full Version : Creating QUAD Elements would openGL be better than Qt



sujan.dasmahapatra
16th October 2009, 12:11
Dear Friends
I need your suggestions I have a QMainWindow where I have a QGraphicsView.
I basically want to display some elements ,i.e QUAD elements these elements will be graphics.
Would be Qt best for this or OpenGL graphics would be better option.This is not 3D graphics but 2D.
Do I need to replace QGraphicsView by QGLWidget to display openGL graphics ?
Any suggestion would be greatly appreciated.

high_flyer
16th October 2009, 12:43
define "best".
What are the requirements of your project?

sujan.dasmahapatra
16th October 2009, 17:30
I have to develop a meshing software where I have a set of data points and I need to create element ,e.g QUAD elements which are to be displayed on the screen. These are basically graphicsItems so I want to deploy them in openGL.

These QUAD elements are in a set may be around 1000 QUAD elements I need to create whihc will be looking like a mesh.

So could you tell me what are the steps to create these element using openGL under Qt framework.

john_god
16th October 2009, 23:35
I would create a class or a struct with a QUAD element, than would create a QList of QUAD's. To display it with Opengl check
http://doc.qt.nokia.com/4.6-snapshot/qglwidget.html#details and check the Qt Opengl examples in the Assistant

wysota
17th October 2009, 10:49
If your graphics view is running an OpenGL viewport, you can use OpenGL calls in your graphics view items paint routines.