|
From: jim h. <jh...@33...> - 2003-11-17 13:26:49
|
Sorry this message 1st apeared in the gl4java.sourceforge forums - didn't see the (obvious) use the mailing list!
If I compile a display list in init() it works fine, but if I do it during the call to display() I can use it during that call but it is gone by the next one!
so in display() I have:
if( gl.glIsList( LIST_NO )
{ gl.glCallList( LIST_NO );
}else
{
System.out.println( "defining new list for " + LIST_NO );
gl.glNewList( LIST_NO , GLEnum.GL_COMPILE_AND_EXCECUTE )
gl.glBegin( //yada yada
//...
gl.glEnd();
gl.endList();
}
Java prints the "defining..." on each repaint, not just once, therefore it is creating the list each time! :-( What's going on here?!
Sometimes I don't want to define somthing at the start in init, because by then I don't have all the info I need. How can I define persistant display lists after initialisation? At the moment the only way I can define new display lists is to create a whole new GLDrawable!
Btw, I am testing this on java 1.4.2 on winXP with the latest nvidia drivers.
Thanks in advance to anyone who can help with this!
Jim
_____________________________________________________________
FREE email and FREE resources at http://333.org
|