Common GL Context Management Adapter

[quote]Okay… so anyone have a small sample of how this works so I can try it out? I just changed a bunch of stuff in JOGL for OSX and I want to make sure what you’re proposing works on OSX.
[/quote]
Gregory,
What I’m trying to accomplish here is to use LWJGL for rendering inside SWT windows / images, instead of in LWJGL Window.

While some ports of SWT (Windows & Motif) do have an experimental OpenGL binding, it supports only OpenGL 1.1.

This binding consists of two nearly orthogonal APIs:

  • org.eclipse.swt.opengl.GLContext
  • org.eclipse.swt.opengl.GL/GLU etc.

For my own SWT port, I only reimplemented the GLContext class and instead of using the GL binding of SWT, I use the much more complete GL binding of LWJGL.

In other words, exactly what Cas finds valuable: the ability to mix & match GL bindings (JOGL, SWT/GL, LWJGL) with GL context implementations (AWT/Swing+JOGL, SWT or LWJGL Window).

Is there any way to test this on OSX with an AWT/Swing component as the container via JOGL content management? Once we get to that then I will work on a JOGL extra component which is pretty much a branch of JOGL that simply establishes the rendering context so that LWJGL can drive the rendering process.

All I need is rendering in an AWT component for LWJGL :slight_smile: I can do anything with SWT because it doesn’t play nicely with Swing yet. I’ve played around with some of the Swing/SWT bindings but they aren’t all there yet…

Ok, I fixed the glXGetProcAddress issue by moving the init of the function pointer to extgl_Open instead of extgl_InitGLX(). Hope it helps.

  • elias

Okay, I’ve got a component and a GL context that is set to current - just lemme know what I need to add to interoperate with LWJGL. Since its not documented yet, I don’t really have any way to complete the task. Essentially I have a component rendering a cube in a window. I just need to replace that rendering in a window with a handoff to LWJGL.