LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: DanDanger on July 27, 2006, 17:38:14

Title: LWJGL and SWT
Post by: DanDanger on July 27, 2006, 17:38:14
Hellos,

Got a bit of a problem I was hoping i could get some help with:

I am building a 3d package using SWT + LWJGL.
The package has your standard 4 windows onto the world, each of which is a canvas using LWJGL. However... each canvas appears to have its own openGL context, so I cannot share display lists and textures between them.

Is is possible to have my 4 windows share the same openGL context? Or is there a better way of having the mutiple windows?

Any help would be appreacieated ^_^
Title: hmmmmmm....
Post by: Fool Running on July 27, 2006, 23:48:53
There is a constructor for AWTGLCanvas (I assume this is what you are using):
AWTGLCanvas(java.awt.GraphicsDevice device, PixelFormat pixel_format, Drawable drawable)
Give the canvas with the context you want to share to this constructor as the last parameter (drawable).
I think that's how contexts are shared (someone correct me if I'm wrong :lol: )
Title: LWJGL and SWT
Post by: DanDanger on July 28, 2006, 11:58:17
Im using SWT not AWT, so that wont work unfortunately.
Title: hmmmmmm....
Post by: Fool Running on July 29, 2006, 18:28:55
Well then I have no idea, unfortunatly :cry:

anyone else can chime in here :lol: