Adding multiple GLEventListener to GLCanvas
Posted by alicana on Apr 11, 2015; 11:15am
URL: https://forum.jogamp.org/Adding-multiple-GLEventListener-to-GLCanvas-tp4034265.html
I have different types of data (e.g. point, line) that should be drawn. I created separate classes for each like below:
public class Point implements GLEventListener
public class Line implements GLEventListener
Is that a good idea that bind and unbind these listeners?
public void drawListener(GLEventListener obj) {
glCanvas.addGLEventListener(obj);
glCanvas.display();
glCanvas.removeGLEventListener(obj);
}
}
If you have any recommendation, I'll be very pleased.