Hi,
I am a little bit confused regarding the most efficient way of updating a GLCanvas. My only knowledge of jogl is “the jogl introduction” pages which I found on the web - it gives an example of a basic 2d program to get you started - I’ve got that working but I’m still a newbie.
Question 1. If a canvas contained a picture containing a complex combination of squares, circles and polygons etc and the next picture was the same as the previous one but for a slight change in the position of a rectangle; then rather than the display() method going through the procedure of repainting the whole canvas is there some super-efficient way of doing it (like having all the GLCanvas’ pixels stored in video memory and thus updating the display much faster) and making swaps between two buffers (double buffering) to avoid screen flicker? If this can be done I’d love to know how.
Question 2. If I had a graphics object which the program used a lot(for example a square with a circle inside it) would it be possible to store this object in video memory and thus speed up the drawing of the object onto the GLCanvas? Again, I’d love to know how, as fast, flicker-free updating of my GLCanvas is paramount to the working of my program.
Any pointers to useful URLs, suggestions, code or feedback would be greatly appreciated.
Regards,
Sally