[Kde-games-devel] Re: simple QGLWidget program

Andreas Beckermann b_mann at gmx.de
Mon Jan 26 22:47:50 CET 2004


On Monday 26 January 2004 20:28, Albert Astals Cid wrote:
> Have a closer look at the qt qglwidget documentation as you seen to not
> have fully undestood it.
>
> In short, you need to reimplement initializeGL() (maybe not completely
> necessary), resizeGL( int w, int h ) (you already do that but in a
> incorerct way as resizeGL is protected) AND the most important paintGL()
> that is the routine that gets called every time the widgets wants to
> redisplay itself. So basically you'll have to change your code to something
> like
[...]
> void base_window :: paintGL()
> {
[...]
>      	glFlush();

You can leave this call out, since Qt does it for you anyway.

Looking at the examples/opengl directory in Qt might be useful as well.

CU
Andi



More information about the kde-games-devel mailing list