Login  Register

Re: Draw without using display(....)

Posted by gouessej on Feb 13, 2014; 11:12pm
URL: https://forum.jogamp.org/Draw-without-using-display-tp4031576p4031579.html

Hi

You can use GLEventListener even under Android, I don't see the problem.

You can perform OpenGL calls without using GLEventListener but it's a bad idea, it's dangerous, it consists in reinventing the wheel, it is only useful in very particular cases. I did that in Ardor3D because it supports multiple renderers including 2 of them not using JOGL, I had to respect its framework based on FrameHandler. I had to handle myself the GLContext (make it current, draw, release it or just draw, never manipulate it and use GLAutoDrawable.invoke()) and to take care of a few special cases. Don't start from scratch, look at our source code if you really want to do that and you'll see it is not trivial.
Julien Gouesse | Personal blog | Website