Hi, I know the init() method is an intializing function which sorts out the graphics information on program start up. I load my objects here etc.
I was just wondering if it can be called again while running of the program? I would like to write over objects created here by loading new objects. (i.e. on the action of a button press)
There may be a better solution to this? All I can think of is calling the init() method again. But I am still unsure how to do this.
public void init(GLDrawable gLDrawable) {
GL gl = drawable.getGL();
...
if (buttonPressed)
loadNewObjects(gl);
else
loadObjects(gl);
}
Thanks