Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
Animation with GLWidget
I am confused how to solve the following situation. I have a collection of data (for several time steps). I hope at each time step one group of data is plotted on the screen, in the next time step the old data on the screen should be cleaned and new data should be plotted on the screen, and so on. In this case I can get a approximate animation of the given data. I have already started with the QT example (GLBox). It seems that it can only plot the data of one time step. How can I benefit with this existed code. Or is there any other clever idea to make an animation? I will appreciate very much if someone can give me a hint.
RE: Animation with GLWidget
For example, you want to show animated GIF.
First, decode GIF into memory buffers.
Then create textures with glGenTextures+glBindTexture+glTexImage2D. Now you can create a timer and connect timeout() signal to some slot. In this slot you should move to the next texture and call updateGL(). In painGL() you should draw current texture.
For convience all texture identificators you can save in std::vector<unsigned int>.
This post has been edited 1 times, last edit by "Krasu" (Apr 20th 2005, 11:09pm)
RE: Animation with GLWidget
There's no place like ::1