KlausCDN
|
Posted: January 02, 2010 16:48 by KlausCDN
|
|
I could solve the problem "GLCanvas Interaction with Slider", posted Dec 11th. glRotatef() does not allow an angle like "jSlider1.getValue()". In the slider event routine it is necessary to move the slider position into a static variable. In the display() routine of the canvas it can be read out from there. Now my animated OpenGl application runs well. Next to the canvas there are two sliders: right beside the canvas a vertical slider with a value of -90 to 90 under the canvas a horizontal slider with a value of -180 to 180 Two lines in the display() method of the canvas rotate first by the vertical then by the horizontal angle. With the template SimpleGLCanvas this very easy to realize in Netbeans. |
glRotatef() requires static variables
Replies: 0 - Last Post: January 02, 2010 16:48
by: KlausCDN
by: KlausCDN
showing 1 - 1 of 1
Replies: 0 - Last Post: January 02, 2010 16:48
by: KlausCDN
by: KlausCDN






