U++ Forum - RDF feed
https://www.ultimatepp.org/forums/
OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14384&th=3209#msg_14384
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)
Luigi]]>forlano2008-02-24T18:25:31-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14387&th=3209#msg_14387
I attached an example I have made with a timer.
By the way, have you tried to run your app in X11?
Matthias]]>masu2008-02-24T20:26:09-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14391&th=3209#msg_14391
masu wrote on Sun, 24 February 2008 21:26
Hi Luigi,
I attached an example I have made with a timer.
By the way, have you tried to run your app in X11?
Matthias
Hi Matthias,
thanks a lot for the example.
I've not yet tried it under linux. I'll give a try tomorrow.
Luigi]]>forlano2008-02-24T22:02:30-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14398&th=3209#msg_14398
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.
Luigi]]>forlano2008-02-25T12:51:52-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14399&th=3209#msg_14399
I get a window handle error when GLCtrl window is mapped to X11 window.
Thanks,
Matthias]]>masu2008-02-25T13:04:55-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14400&th=3209#msg_14400
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.
Luigi]]>forlano2008-02-25T13:56:06-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14401&th=3209#msg_14401
mr_ped2008-02-25T14:36:33-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14402&th=3209#msg_14402
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.
Luigi]]>forlano2008-02-25T14:56:17-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14403&th=3209#msg_14403
Regards,
Matthias]]>masu2008-02-25T14:57:42-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14406&th=3209#msg_14406
masu wrote on Mon, 25 February 2008 15:57
Have you compiled it in DEBUG mode?
Regards,
Matthias
No, only in release mode. If you think make sense to test even the debug mode I'll try it too.
Luigi]]>forlano2008-02-25T15:16:10-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14407&th=3209#msg_14407
But I am not sure whether the X11 error messages were already implemented in your version.
Matthias]]>masu2008-02-25T15:28:16-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14410&th=3209#msg_14410
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.
Matthias
I compiled in debug mode and got the same error.
Luigi]]>forlano2008-02-25T18:16:58-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14415&th=3209#msg_14415
I fixed the problem I encountered with OpenGL example.
See topic: http://www.ultimatepp.org/forum/index.php?t=msg&th=3204& amp;start=0&
Matthias]]>masu2008-02-25T20:52:15-00:00Re: OpenGL and continous animation
https://www.ultimatepp.org/forums/index.php?t=rview&goto=14416&th=3209#msg_14416