canvas.removeGLEventListener(this);
this.c3d = c3d;
glc = gc;
if (glc==null) glc = new GLCapabilities();
if (ctx==null) ctx = GLContextFactory.getFactory().createGLContext((Component)owner, glc, new DefaultGLCapabilitiesChooser(), null);
if (!ctx.canCreatePbufferContext()) throw new RuntimeException("PBuffers not supported.");
pbuffer = new GLPbufferImpl(ctx.createPbufferContext(glc,width,height));
pbuffer.addGLEventListener(this);
}