It was my understanding that QtJambi required JOGL to use OpenGL
rendering.  If this is not the case, I would absolutely be thrilled,
but I've only seen examples where JOGL is used alongside QtJambi (like
the link below).

http://hoheinzollern.wordpress.com/2009/03/21/off-screen-rendering-with-qtjambi-jogl/

Without including the JOGL libraries, I was hitting import errors
saying things like GLProfile weren't found (which is indeed a JOGL
class).  Also using the code I provided and using a GL2 context,
QtJambi seems to work fine.  If there are any QtJambi/OpenGL examples
out there that don't require JOGL, I would be very happy to not have
to include the JOGL libraries anymore.

Thanks, Josh

On Fri, Oct 8, 2010 at 1:03 AM, Samu Voutilainen <[email protected]> wrote:
> 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
>> [email protected]
>> 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
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
>

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to