On torstai 07 lokakuu 2010 20:40:02 Josh Stratton wrote:
> I'm having some difficulty getting a GL3 context now that I've
> switched to QtJambi.  When casting my gl object to GL using getGL3, it
> throws the error "javax.media.opengl.GLException: Not a GL3
> implementation".
> 
> This is my original code when I was using swing...
> GLProfile profile = GLProfile.get(GLProfile.GL3)
> GLCapabilities glCaps = new GLCapabilities(profile)
> glCaps.setPBuffer(true)
> GLPBuffer pbuffer =
> GLDrawableFactory.getFactory(profile).createGLPbuffer(glCaps,
> 
>        new DefaultGLCapabilitiesChooser(),
> 
>        1, 1, null)
> canvas = new GLCanvas(glCaps, new DefaultGLCapabilitiesChooser(),
> PanelGL.pbuffer.getContext(), null)
> 
> Switch to QtJambi, I have the following code:
> 
> 
>     GLProfile profile = GLProfile.get(GLProfile::GL3)
>     GLCapabilities glCaps = GLCapabilities.new(profile)
>     glCaps.setPBuffer(true)
>     factory = GLDrawableFactory.getFactory(profile)
>     ctx = factory.createExternalGLContext
>     gl = ctx.getGL.getGL3
> 
> This last line throws an error.  I've seen this page
> (http://www.javagaming.org/index.php?action=printpage;topic=21064.0),
> which solves the issue, but it's passing something to a GLCanvas
> constructor, which is swing.  Is there an equivalent setup in QtJambi
> to get me a GL3 object?
> _______________________________________________
> Qt-jambi-interest mailing list
> Qt-jambi-interest@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Do I misinterpret this, but are you trying to mix up pure Java objects with Qt 
Jambi objects?

Qt has its own OpenGL module, QtOpenGL, can’t you use it?

There is a bridge which should allow bridging AWT widgets and Jambi widgets, 
butI don’t know if it can cope with Swing types. Most likely no.
http://qt.gitorious.org/qt-jambi/community-qtjambi-awtbridge

_______________________________________________
Qt-jambi-interest mailing list
Qt-jambi-interest@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to