RobStar
15th January 2014, 11:44
Hi,
I am a recently retired software developer and total newcomer to QT and OpenGL ( Although I did have some exposure to OpenGL in the late 80's , has it changed ) . My interests are in Astronomy and astronomy software applications. For the last twenty years I have been developing computational geometry algorithms for a major graphics software vendor. I haven't developed a GUI since 1995 so what an eye opener QT is. It was a choice between QT or .Net . After exposure to a number of very professional and stable QT astronomy applications and a desire to move away from managed code I decided to spend my retirement graphics programming in QT and OpenGL and with maybe a bit of Angle.
I have a problem with OpenGL not drawing ( not displaying ) after the initial draw. The call to do the draw is invoked from QGraphicsView::drawBackground and I am using glDrawElements to draw 2 million triangles. On the first call the triangles are drawn correctly in an incredible 60 milli seconds. For the second and subsequent calls they just don't appear on the screen. I have set the view port to a QGLWidget and I am using gLOrtho to set the transformation from my real world coordinates. The problem could be due to my inexperience in initializing and sequencing the OpenGL calls correctly. However on the second and subsequent calls I can draw lines with openGL if I express their coordinates in screen coordinates.
I would appreciate some advice on the correct sequencing of the OpenGL calls for this requirement or referral to some OpenGL example that shows this. Or consequently any advice on what I may be doing incorrectly.
Rob
I am a recently retired software developer and total newcomer to QT and OpenGL ( Although I did have some exposure to OpenGL in the late 80's , has it changed ) . My interests are in Astronomy and astronomy software applications. For the last twenty years I have been developing computational geometry algorithms for a major graphics software vendor. I haven't developed a GUI since 1995 so what an eye opener QT is. It was a choice between QT or .Net . After exposure to a number of very professional and stable QT astronomy applications and a desire to move away from managed code I decided to spend my retirement graphics programming in QT and OpenGL and with maybe a bit of Angle.
I have a problem with OpenGL not drawing ( not displaying ) after the initial draw. The call to do the draw is invoked from QGraphicsView::drawBackground and I am using glDrawElements to draw 2 million triangles. On the first call the triangles are drawn correctly in an incredible 60 milli seconds. For the second and subsequent calls they just don't appear on the screen. I have set the view port to a QGLWidget and I am using gLOrtho to set the transformation from my real world coordinates. The problem could be due to my inexperience in initializing and sequencing the OpenGL calls correctly. However on the second and subsequent calls I can draw lines with openGL if I express their coordinates in screen coordinates.
I would appreciate some advice on the correct sequencing of the OpenGL calls for this requirement or referral to some OpenGL example that shows this. Or consequently any advice on what I may be doing incorrectly.
Rob