PDA

View Full Version : OpenGL 2D drawing problem



kuku83
25th February 2011, 07:50
We are trying to speedup our implementation of 2D drawing with GLWidget extension, however the result of GLWidget implementation is very very poor ...

We changed QWidget to QGLWidget but kept the paintEvent implementation

Maybe we have to change more intructions?

Thank you in advance

stampede
25th February 2011, 10:10
Typically when using QGLWidget you want to do your painting (OpenGL calls) in paintGL method.
If you have done all your painting stuff in paintEvent and simply changed the QWidget to QGLWidget I don't really see why there should be performance boost, I'd rather expect the opposite.
It would be easier to say more if we could actually see some of your code, and explanation what are you painting in your paintEvent.
QGLWidget is used to provide possibility to render OpenGL graphics - basically a scene consisting of primitives.