glRotatef() requires static variables

  1 post   Feedicon  
Replies: 0 - Last Post: January 02, 2010 16:48
by: KlausCDN
showing 1 - 1 of 1
 
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.

Replies: 0 - Last Post: January 02, 2010 16:48
by: KlausCDN
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close