This is another similar QtJambi example, but it looks like pre-JOGL2
so it doesn't implement profiles.  It is quite similar to what I'm
doing, though.

http://www.dreamincode.net/forums/topic/87029-opengl-lighting-questions/

On Fri, Oct 8, 2010 at 9:12 AM, Josh Stratton <[email protected]> wrote:
>> From experience I know that if such a high version number is reported, the 
>> functionality is also truly there, so the nVidia driver isn't flat-out 
>> lying. But you only get backward-compatible contexts that way, not 
>> forward-compatible ones.
>
> I'll have to check the version number that the context returns.  I'm
> just confused why in this situation, the GL object returned is a GL2
> object even though I requested the GL3 implementation.  In the example
> fix I linked to, they did something similar in java swing, so I'm not
> sure if I have to do some radically different in QtJambi.  In the
> swing case, there's a GLCanvas object with specified constructors that
> handle these contexts and profiles.  With QtJambi, I don't think these
> kinds of hooks exist in the API.
>
>> I'm curious whether you can confirm that behavior.
>
> Which behavior?  The querying the version number?
>
>>
>> Regards,
>> Gregor
>>
>> -------- Original-Nachricht --------
>>> Datum: Fri, 8 Oct 2010 07:57:20 -0700
>>> Von: Josh Stratton <[email protected]>
>>> An: Samu Voutilainen <[email protected]>
>>> CC: [email protected]
>>> Betreff: Re: [Qt-jambi-interest] getting a gl3 context
>>
>>> 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
>>
>> --
>> GRATIS! Movie-FLAT mit über 300 Videos.
>> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome
>>
>>
>> --
>> GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit
>> gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
>> _______________________________________________
>> 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