Switching Renderers

Hello there. I have a question to you all:

how do you “switch” renderers?

This is my situation: i have two renderer class (that I call “scenes”), one is for the “introduction”, the other does the main work.

After the user loads a file this other renderer is added to the GLCanvas, but if I load another file, another renderer is added to the GLCanvas while maintaing the other.

I noticed it is actually continuing to draw the previous renderer display() scene even if those objects are not seen anymore (because only the code in the last renderer class is displayed).

I tried to do a glCanvas.removeGLEventListener but it doesn’t seem to work.

So how do you do it?

I remember there is a JoGL demo named proceduralTexturePhysics. In the class Water, they create a GLDrawable object pBuffer and do the rendering with switching two renderers.

Take a look at it from JoGL’s website and that might help.