Draw without using display(....)
Posted by Tor Einar on Feb 13, 2014; 8:43pm
URL: https://forum.jogamp.org/Draw-without-using-display-tp4031576.html
Hi, im new to JOGL and was wondering if its possible to get a object from the GLCanvas (or some other defined object)
to use for drawing.
Example:
drawSomething(something)
myPredefinedGLObject.glBegin()
myPredefinedGLObject.glVertex2d(something)
myPredefinedGLObject.glEnd()
OR
drawSomething(something)
GL gl = myPredefinedObject.getGL()
.......
.......
Instead of using
display(GLAutoDrawable glDrawable)
......
The reason for me asking is abstraction. I want to use a drawable interface with methods for drawing different shapes.
Then i can implement a Android drawable, OpenGL drawable ... whatever drawable and use this without thinking about the graphic engine behind.
Kind regards Tor Einar