Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » OpenGL and continous animation
OpenGL and continous animation [message #14384] Sun, 24 February 2008 19:25 Go to previous message
forlano is currently offline  forlano
Messages: 1085
Registered: March 2006
Location: Italy
Experienced Contributor
Hello,

I found http://nehe.gamedev.net where there are nice tutorials covering OpenGL. I followed the first tutorials and I used as skeleton the package refence/OpenGL. All the code of the tutorial finish in GLPaint() method and everything works perfectly.

What I would like to have now is the automatic animation of the picture without to drive it with the mouse done via
	
virtual void MouseMove(Point p, dword) {
		point = p;
		Refresh();
	}


It should be very easy but I am facing problem.
For example I added the callback LeftDown and the method Rotate() that change some parameter of the figure but nothing change in the screen when I leftclick
	virtual void LeftDown(Point p, dword) {
		Rotate();
	}

	void Rotate( ) 
	{ for(int i=1;i<=1000000;i++) {
	 	 rtri+=0.2f; //it is used in GlPaint
	   	 Refresh();
	  }
	}

Instead MouseMove() works fine. What am I missing? Embarassed
(tell me if a testcase is needed although refence/OpenGL with an automatic animation would be ok)

Luigi
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [SOLVED] OpenGL reference example X11 crash
Next Topic: openGL and texture
Goto Forum:
  


Current Time: Wed Apr 08 01:39:33 CEST 2020

Total time taken to generate the page: 0.01044 seconds