i’m working on a simple testbed utilizing JOGL. right now i have an object called Renderer which handles GL’s init(), display(), reshape() calls. i can see into the future of my project that the display() call will become quite complex. i know i can create another object to actually make all of these calls as in:
public void display(GLAutoDrawable drawable) { myObjectThatFiguresOutWhatToDrawAndHow.sendOpenGLCommandStream(); }
where sendOpenGLCommandStream() simply encapsulates calls like glRotatef(), glutSolidCube(), glPushMatrix(), etc.
but, is this innefficient? do large JOGL or OpenGL apps have extremely long display() functions, or what? i’ve tested it at a small level with no performance hit, but i’m not sure how it would fare in a fully busy complex app.
thx in advance for any help…