forlano Messages: 1207 Registered: March 2006 Location: Italy
Senior 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
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?
(tell me if a testcase is needed although refence/OpenGL with an automatic animation would be ok)
forlano Messages: 1207 Registered: March 2006 Location: Italy
Senior Contributor
masu wrote on Sun, 24 February 2008 21:26
By the way, have you tried to run your app in X11?
Matthias
I tried in Ubuntu but I was not able to compile your code. It does not find GL/gl.h etc... Under linux I've not the latest dev version and maybe I should install the openGL too.
I should update it but I use U++-linux rarely.
It would be nice if you can check it with Linux since I have problems with X11 GLCtrl implementation.
I get a window handle error when GLCtrl window is mapped to X11 window.
forlano Messages: 1207 Registered: March 2006 Location: Italy
Senior Contributor
masu wrote on Mon, 25 February 2008 14:04
It would be nice if you can check it with Linux since I have problems with X11 GLCtrl implementation.
I get a window handle error when GLCtrl window is mapped to X11 window.
Thanks,
Matthias
I've Ubuntu. Do you know if the openGL library come with U++ or I should install it from a thirth part? At the moment there are many gl...h not found.
forlano Messages: 1207 Registered: March 2006 Location: Italy
Senior Contributor
mr_ped wrote on Mon, 25 February 2008 15:36
try to look in synaptic (or what package manager you use) for opengl libraries, especially for packages with "*dev" at end.
OK, I installed Mesa and compiled the reference test case and the Matthias' package. Both compile without problem but do not show anything. The error message in the opened window is:
"GLCtrl: CreateGLXWindow: impossible to find a suitable visual"
I can run other test package if this can help. Please consider that my linux Upp-dev version is before of 2008, perhaps the december version. Please post o pm to me the most updated GL package if you want I try it on linux.
Thanks Luigi, can you please compile in DEBUG mode, I would like to see if you also get the message I got.
But I am not sure whether the X11 error messages were already implemented in your version.
forlano Messages: 1207 Registered: March 2006 Location: Italy
Senior Contributor
masu wrote on Mon, 25 February 2008 16:28
Thanks Luigi, can you please compile in DEBUG mode, I would like to see if you also get the message I got.
But I am not sure whether the X11 error messages were already implemented in your version.