Hi! Qt Jambi really requires JOGL as an interface to OpenGL itself, as this is out of the scope of Qt. There exists another set of bindings called LWJGL that can probably used instead of JOGL, but there is no way to do OpenGL rendering with Qt Jambi alone.
I just printed the GL version string returned by a QGLWidget-created OpenGL context and it is reported as "4.0.0 NVIDIA 256.40" (on Linux). So at least in that combination, no dedicated setup code is required for OpenGL 3.x or higher. However, I cannot test on ATI hardware/drivers. 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'm curious whether you can confirm that behavior. 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 €/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
