[Jprogramming] opengl

Eric Iverson eiverson at sympatico.ca
Mon Feb 6 06:34:43 HKT 2006


 Brian,

The two problems, drawing (based on the current state) and stepping 
(updating the state) should be orthogonal. I suggest you create a dead 
simple bit of drawing code. For example, draw a long rectangle in the 2d 
plain at a rotation value of global q. Then the first and simplest stepping 
code to add is a go verb that draws the current drawing and increments the q 
value.

Now if you manually type go'' over and over you will see the rectangle 
rotate.

Now you have a simple test bed for playing with real code examples that try 
different approaches to the stepping problem. And if you post that code it 
will be easy for others to amend it with easy examples of timer stepping 
that actually work.

I think at that time you'll find that a very simple timer event that simply 
does the drawing based on the current state and then updates the state will 
do what you some part of what you want.

Spoiler: opengl is being completely reworked for J6. It will be mostly 
compatible, but problems such as the current one will be easier to solve and 
in more ways.



More information about the Programming mailing list