From: Kenneth B. R. <kbr...@al...> - 2002-02-07 04:20:28
|
> I am porting my application from Magician to GL4Java, and there are some > differences in the two APIs that I am trying to figure out. > Specifically, I was sharing display lists and textures between two > displays (ie, two GLDrawables) in my app. In the old API, I was able to > create my second "GLDrawable" by passing in my first "GLDrawable" as an > argument during creation. This linked the two OpenGL state machines and > allowed the desired sharing. > > Does anyone know the proper way to do this in GL4Java? In the > GLDrawableFactory class, I saw that createGLAnimCanvas() was overloaded > to take the arguments 'glName' and 'gluName', but I don't think that is > what I am looking for, is it? We tried getting the Context from the > first GLDrawable and setting it in the second GLDrawable, but that > caused nothing to be rendered at all. Does anyone have some advice? The GLDrawable APIs (largely borrowed from Magician) were added fairly late, so there is still missing functionality like this. The underlying mechanism should be available; GLContext can take a "shared" GLContext in its constructor. There are some demonstrations (all of which depend on subclassing GLCanvas) of this functionality in the demos. |