Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

10978 Posts in 1395 Topics- by 475 Members - Latest Member: simonjonet47

10. March 2010, 07:53:12 PM
Xith3D CommunityGeneral CategoryFeature Requests & Brilliant Ideas (Moderators: Marvin Fröhlich, 'n ddrylliog)Integration with Qt Jambi GUI
Pages: [1] 2 3 4
Print
Author Topic: Integration with Qt Jambi GUI  (Read 14796 times)
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« on: 25. June 2007, 09:54:16 AM »

Hello,

Trolltech has released the final version of Qt Jambi, which is a porting of Qt v4.3 GUI toolkit in Java language.
Jambi integrates a QGLWidget widget which allows to use OpenGL in a widget. We can use JOGL in this widget for example.

So i would like to use Qt Jambi for my application, but I'd like also to use a 3D Scenegraph  with.
The problems with scenegraphs is that they often use Swing or AWT for displaying by default and I don't know how to specify QGLWidget as the default windows host.

So i've tried to integrate the BaseTest Example in a QGLWidget but this doesn't work.
I suppose that i couldn't use the Canvas3DWrapper directly.

So my question is : how to use Xith3D with Qt Jambi ?


Thanks for any help !


Here is the source code of an example with QGLWidget using JOGL:
Code:
/****************************************************************************
**
** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
**
** This file is part of Qt Jambi.
**
** ** This file may be used under the terms of the GNU General Public
** License version 2.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of
** this file.  Please review the following information to ensure GNU
** General Public Licensing requirements will be met:
** http://www.trolltech.com/products/qt/opensource.html
**
** If you are unsure which license is appropriate for your use, please
** review the following information:
** http://www.trolltech.com/products/qt/licensing.html or contact the
** sales department at sales@trolltech.com.

**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/

package com.trolltech.demos;

import com.trolltech.qt.core.*;
import com.trolltech.qt.gui.*;
import com.trolltech.qt.opengl.*;
import com.trolltech.examples.*;

import javax.media.opengl.*;

class GLWidget extends QGLWidget
{
    int object;
    int xRot;
    int yRot;
    int zRot;
    QPoint lastPos = new QPoint();
    QColor trolltechGreen = new QColor();
    QColor trolltechPurple = new QColor();
    GL func = null;
    GLContext ctx = null;


    public Signal1<Integer> xRotationChanged = new Signal1<Integer>();
    public Signal1<Integer> yRotationChanged = new Signal1<Integer>();
    public Signal1<Integer> zRotationChanged = new Signal1<Integer>();

    public GLWidget(QWidget parent) {
        super(parent);
        object = 0;
        xRot = 0;
        yRot = 0;
        zRot = 0;

        trolltechGreen = QColor.fromCmykF(0.40, 0.0, 1.0, 0.0);
        trolltechPurple = QColor.fromCmykF(0.39, 0.39, 0.0, 0.0);
    }

    protected void disposed()
    {
        makeCurrent();
        func.glDeleteLists(object, 1);
    }

    public QSize minimumSizeHint()
    {
        return new QSize(50, 50);
    }

    public QSize sizeHint()
    {
        return new QSize(400, 400);
    }

    void setXRotation(int _angle)
    {
        int angle[] = { _angle };
        normalizeAngle(angle);

        if (angle[0] != xRot) {
            xRot = angle[0];
            xRotationChanged.emit(xRot);
            updateGL();
        }
    }

    void setYRotation(int _angle)
    {
        int angle[] = { _angle };
        normalizeAngle(angle);

        if (angle[0] != yRot) {
            yRot = angle[0];
            yRotationChanged.emit(yRot);
            updateGL();
        }
    }

    void setZRotation(int _angle)
    {
        int angle[] = { _angle };
        normalizeAngle(angle);

        if (angle[0] != zRot) {
            zRot = angle[0];
            zRotationChanged.emit(zRot);
            updateGL();
        }
    }

    protected void initializeGL()
    {
        GLDrawableFactory factory = GLDrawableFactory.getFactory();
        ctx = factory.createExternalGLContext();
        func = ctx.getGL();

        qglClearColor(trolltechPurple.darker());
        object = makeObject();

        func.glShadeModel(GL.GL_FLAT);
        func.glEnable(GL.GL_DEPTH_TEST);
        func.glEnable(GL.GL_CULL_FACE);

    }

    protected void paintGL()
    {
        func.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
        func.glLoadIdentity();
        func.glTranslated(0.0, 0.0, -10.0);
        func.glRotated(xRot / 16.0, 1.0, 0.0, 0.0);
        func.glRotated(yRot / 16.0, 0.0, 1.0, 0.0);
        func.glRotated(zRot / 16.0, 0.0, 0.0, 1.0);
        func.glCallList(object);
    }

    protected void resizeGL(int width, int height)
    {
        int side = Math.min(width, height);
        func.glViewport((width - side) / 2, (height - side) / 2, side, side);

        func.glMatrixMode(GL.GL_PROJECTION);
        func.glLoadIdentity();
        func.glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0);
        func.glMatrixMode(GL.GL_MODELVIEW);
    }

    protected void mousePressEvent(QMouseEvent event)
    {
        lastPos = event.pos();
    }

    protected void mouseMoveEvent(QMouseEvent event)
    {
        int dx = event.x() - lastPos.x();
        int dy = event.y() - lastPos.y();

        if (event.buttons().isSet(Qt.MouseButton.LeftButton)) {
            setXRotation(xRot + 8 * dy);
            setYRotation(yRot + 8 * dx);
        } else if (event.buttons().isSet(Qt.MouseButton.RightButton)) {
            setXRotation(xRot + 8 * dy);
            setZRotation(zRot + 8 * dx);
        }
        lastPos = event.pos();
    }

    int makeObject()
    {
        int list = func.glGenLists(1);
        func.glNewList(list, GL.GL_COMPILE);

        func.glBegin(GL.GL_QUADS);

        double x1 = 0.06;

        double y1 = -0.14;
        double x2 = +0.14;
        double y2 = -0.06;
        double x3 = +0.08;
        double y3 = +0.00;
        double x4 = +0.30;
        double y4 = +0.22;

        quad(x1, y1, x2, y2, y2, x2, y1, x1);
        quad(x3, y3, x4, y4, y4, x4, y3, x3);

        extrude(x1, y1, x2, y2);
        extrude(x2, y2, y2, x2);
        extrude(y2, x2, y1, x1);
        extrude(y1, x1, x1, y1);
        extrude(x3, y3, x4, y4);
        extrude(x4, y4, y4, x4);
        extrude(y4, x4, y3, x3);

        final double Pi = 3.14159265358979323846;
        final int NumSectors = 200;

        for (int i=0; i<NumSectors; ++i) {
            double angle1 = (i * 2 * Pi) / NumSectors;
            double x5 = 0.30 * Math.sin(angle1);
            double y5 = 0.30 * Math.cos(angle1);
            double x6 = 0.20 * Math.sin(angle1);
            double y6 = 0.20 * Math.cos(angle1);

            double angle2 = ((i + 1) * 2 * Pi) / NumSectors;
            double x7 = 0.20 * Math.sin(angle2);
            double y7 = 0.20 * Math.cos(angle2);
            double x8 = 0.30 * Math.sin(angle2);
            double y8 = 0.30 * Math.cos(angle2);

            quad(x5, y5, x6, y6, x7, y7, x8, y8);

            extrude(x6, y6, x7, y7);
            extrude(x8, y8, x5, y5);
        }

        func.glEnd();
        func.glEndList();

        return list;
    }

    void quad(double x1, double y1, double x2, double y2,
              double x3, double y3, double x4, double y4)
    {
        qglColor(trolltechGreen);

        func.glVertex3d(x1, y1, -0.05);
        func.glVertex3d(x2, y2, -0.05);
        func.glVertex3d(x3, y3, -0.05);
        func.glVertex3d(x4, y4, -0.05);

        func.glVertex3d(x4, y4, +0.05);
        func.glVertex3d(x3, y3, +0.05);
        func.glVertex3d(x2, y2, +0.05);
        func.glVertex3d(x1, y1, +0.05);
    }

    void extrude(double x1, double y1, double x2, double y2)
    {
        qglColor(trolltechGreen.darker(250 + (int)(100 * x1)));
        func.glVertex3d(x1, y1, +0.05);
        func.glVertex3d(x2, y2, +0.05);
        func.glVertex3d(x2, y2, -0.05);
        func.glVertex3d(x1, y1, -0.05);

    }

    void normalizeAngle(int angle[])
    {
        while (angle[0] < 0)
            angle[0] += 360 * 16;
        while (angle[0] > 360 * 16)
            angle[0] -= 360 * 16;
    }
}

@QtJambiExample(name = "Open GL",
                canInstantiate = "call-static-method:checkJoglSupport")
public class HelloGL extends QWidget
{
    GLWidget glWidget = null;
    QSlider xSlider = null;
    QSlider ySlider = null;
    QSlider zSlider = null;

    QSlider createSlider(String setterSlot)
    {
        QSlider slider = new QSlider(Qt.Orientation.Vertical);
        slider.setRange(0, 360 * 16);
        slider.setSingleStep(16);
        slider.setPageStep(15 * 16);
        slider.setTickInterval(15 * 16);
        slider.setTickPosition(QSlider.TickPosition.TicksAbove);
        slider.valueChanged.connect(glWidget, setterSlot);
        return slider;
    }

    public HelloGL() { this(null); }

    public HelloGL(QWidget w)
    {
        glWidget = new GLWidget(w);

        xSlider = createSlider("setXRotation(int)");
        glWidget.xRotationChanged.connect(xSlider, "setValue(int)");

        ySlider = createSlider("setYRotation(int)");
        glWidget.yRotationChanged.connect(ySlider, "setValue(int)");

        zSlider = createSlider("setZRotation(int)");
        glWidget.zRotationChanged.connect(zSlider, "setValue(int)");

        QHBoxLayout mainLayout = new QHBoxLayout();
        mainLayout.addWidget(glWidget);
        mainLayout.addWidget(xSlider);
        mainLayout.addWidget(ySlider);
        mainLayout.addWidget(zSlider);
        setLayout(mainLayout);

        xSlider.setValue(15 * 16);
        ySlider.setValue(345 * 16);
        zSlider.setValue(0 * 16);

        setWindowTitle(tr("Hello GL"));
        setWindowIcon(new QIcon("classpath:com/trolltech/images/qt-logo.png"));
    }

    public static boolean checkJoglSupport() {
        try {
            Class.forName("javax.media.opengl.GL");
            return true;
        } catch (Exception e) {
        }
        return false;
    }

    public static void main(String args[])
    {
        QApplication.initialize(args);

        if (!checkJoglSupport()) {
            QMessageBox.critical(null, "OpenGL Missing", "This Example requires OpenGL for Java\nAvalable at: <i>https://jogl.dev.java.net/</i>");
            return;
        }

        HelloGL window = new HelloGL();
        window.show();
        QApplication.exec();
        window.dispose();
    }
}

Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4064


May the 4th, be with you...


View Profile WWW
« Reply #1 on: 25. June 2007, 12:34:38 PM »

Hi, Ludo. Welcome to Xith3D Smiley.

Well, all that's necessary to implement that in Xith3D is to write a special extension of org.xith3d.render.jsr231.CanvasPeerImplBase. I could do this in two or three weeks (Currently I have other tasks to do in the project) or you could try to do it. Of course you should use the latest SVN trunk then.

Marvin

Oh, btw. Having a OQ implementation like this as part of the project is a really interesting thing, I believe. It will be done one way or the other.
« Last Edit: 25. June 2007, 12:37:43 PM by Marvin Fröhlich » Logged
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #2 on: 25. June 2007, 01:17:23 PM »

Thanks for welcome and support. Smiley

I can try to implement this extension. Cool
So I should write CanvasPeerQtJambiImpl and RenderPeerQtJambiImpl classes in the same way as CanvasPeerSWTImpl and RenderPeerSWTImpl (or AWT or Swing impls) ?

And sorry for that noob question, but where is the lastest SVN trunk and how to use it with eclipse ?
For now, i 'm using Xith3d v0.9.0beta2 from FTP in eclipse 3.2.2 with JRE(1.5.0_06-b05) on Linux Red Hat 8.


Edit: Apparently, svn trunk is here : https://xith3d.svn.sourceforge.net:9443/svnroot/xith3d/branches/0.9.0/
But this link looks dead or really too slow. Undecided
...or my proxy doesn't allow me to access it.



« Last Edit: 25. June 2007, 01:22:21 PM by Ludo » Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1185



View Profile WWW Email
« Reply #3 on: 25. June 2007, 01:51:30 PM »

Hi Ludo, welcome to the Xith3D world, I wish you success with that QTJambi extension Smiley

Look here : http://www.xith.org/forum/index.php?action=dlattach;topic=51.0;attach=35
for informations about the SVN

(what you posted is the 0.9.0 branch in the old repository Smiley it's not the trunk at all)
« Last Edit: 25. June 2007, 01:53:02 PM by Amos Wenger » Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4064


May the 4th, be with you...


View Profile WWW
« Reply #4 on: 25. June 2007, 01:57:59 PM »

I can try to implement this extension. Cool
So I should write CanvasPeerQtJambiImpl and RenderPeerQtJambiImpl classes in the same way as CanvasPeerSWTImpl and RenderPeerSWTImpl (or AWT or Swing impls) ?

Yes, CanvasPeerQtJambiImpl.
Logged
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #5 on: 26. June 2007, 09:40:56 AM »

Thanks you for the guide for svn. I've used Subversive eclipse plugin instead of Subclipse but I think it doesn't change anything.
I suppose that the example in your document is out of date now.
i've one error when building xith-tk:
Severity and Description   Path   Resource   Location   Creation Time   Id
The method isEmpty() is undefined for the type String   xith-tk/src/org/xith3d/loaders/models/impl/obj   OBJConverter.java   line 204   1182848589777   74096


I don't know if it's "normal". Xith3DTestLauncher works ok and tests also.
But I can't use LWJGL layer at work:
Code:
java.lang.Error: java.lang.reflect.InvocationTargetException
at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:153)
at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:233)
at org.xith3d.test.benchmark.BenchmarkBase.<init>(BenchmarkBase.java:169)
at org.xith3d.test.benchmark.CubeBenchmark.<init>(CubeBenchmark.java:78)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.xith3d.test.Xith3DTestLauncher.runTest(Xith3DTestLauncher.java:679)
at org.xith3d.test.Xith3DTestLauncher.onStartButtonClicked(Xith3DTestLauncher.java:172)
at org.xith3d.utility.launching.DisplayOptions.waitForStart(DisplayOptions.java:1030)
at org.xith3d.utility.launching.DisplayOptions.<init>(DisplayOptions.java:1060)
at org.xith3d.utility.launching.DisplayOptions.<init>(DisplayOptions.java:1065)
at org.xith3d.test.Xith3DTestLauncher.<init>(Xith3DTestLauncher.java:584)
at org.xith3d.test.Xith3DTestLauncher.main(Xith3DTestLauncher.java:733)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:149)
... 14 more
Caused by: java.lang.RuntimeException: org.lwjgl.LWJGLException: Could not choose GLX13 config
at org.xith3d.render.lwjgl.CanvasPeerImplNative.<init>(CanvasPeerImplNative.java:117)
... 19 more
Caused by: org.lwjgl.LWJGLException: Could not choose GLX13 config
at org.lwjgl.opengl.LinuxDisplayPeerInfo.initDefaultPeerInfo(Native Method)
at org.lwjgl.opengl.LinuxDisplayPeerInfo.<init>(LinuxDisplayPeerInfo.java:52)
at org.lwjgl.opengl.LinuxDisplay.createPeerInfo(LinuxDisplay.java:628)
at org.lwjgl.opengl.Display.create(Display.java:692)
at org.lwjgl.opengl.Display.create(Display.java:648)
at org.xith3d.render.lwjgl.CanvasPeerImplNative.<init>(CanvasPeerImplNative.java:101)
... 19 more
Other layers work ok, even LWJGL_AWT. Huh



I've started working on the implementation of Qt Jambi layer.
I'm trying to find equivalences between Qt Jambi and and other GUI toolkits (SWT, swing, awt).

Firstly, i think that QGLWidget (Qt jambi) works like a canvas element, because this is the container which "displays" OpenGL, and also because a 'QGLWidget.makeCurrent()' method already exists.

Secondly, I suppose that the equivalent of a Frame or a JFrame is a QWidget.
A QWidget is a basic window in QtJambi system.

So, i'd like to test this implementation with a basic example, but I don't know the easiest way to test it.
So what is the easiest way to test my implementation ?
A example like the one which was in your doc about SVN would be great (the static cube).

Thanks
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4064


May the 4th, be with you...


View Profile WWW
« Reply #6 on: 26. June 2007, 10:45:05 AM »

Thanks you for the guide for svn. I've used Subversive eclipse plugin instead of Subclipse but I think it doesn't change anything.

No. It's not a difference.

I suppose that the example in your document is out of date now.
i've one error when building xith-tk:
Severity and Description   Path   Resource   Location   Creation Time   Id
The method isEmpty() is undefined for the type String   xith-tk/src/org/xith3d/loaders/models/impl/obj   OBJConverter.java   line 204   1182848589777   74096


No. It's not out of date (I hope). This error was related to a Java 1.6 dependency. I have removed this dependency. Please tell me, if there are others.

I don't know if it's "normal". Xith3DTestLauncher works ok and tests also.
But I can't use LWJGL layer at work:
Code:
...
Other layers work ok, even LWJGL_AWT. Huh

I don't know. Must be something in your system. Well, if the others work, there should not be a major problem.

So, i'd like to test this implementation with a basic example, but I don't know the easiest way to test it.
So what is the easiest way to test my implementation ?
A example like the one which was in your doc about SVN would be great (the static cube).

Well, I suppose, you have also added an enum constant to the OpenGLLayer enum (and returned it in the getType() method of your new CanvasPeer implementation)? If not, please do so. Then you can simply use the Xith3DTestLauncher, select the new OpenGLLayer and run any testcase.

Marvin
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1185



View Profile WWW Email
« Reply #7 on: 26. June 2007, 11:19:47 AM »

No. It's not out of date (I hope). This error was related to a Java 1.6 dependency. I have removed this dependency. Please tell me, if there are others.
It is Sad Someone else reported me that.
Logged
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #8 on: 26. June 2007, 02:06:49 PM »

Quote
Well, I suppose, you have also added an enum constant to the OpenGLLayer enum (and returned it in the getType() method of your new CanvasPeer implementation)? If not, please do so. Then you can simply use the Xith3DTestLauncher, select the new OpenGLLayer and run any testcase.
Ok I try it.
I need also to modify DisplayOptions.java, DisplayModeSelector.java and Canvas3DFactory.java apparently.
...and maybe other files.
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1185



View Profile WWW Email
« Reply #9 on: 26. June 2007, 03:22:39 PM »

Quote
Well, I suppose, you have also added an enum constant to the OpenGLLayer enum (and returned it in the getType() method of your new CanvasPeer implementation)? If not, please do so. Then you can simply use the Xith3DTestLauncher, select the new OpenGLLayer and run any testcase.
Ok I try it.
I need also to modify DisplayOptions.java, DisplayModeSelector.java and Canvas3DFactory.java apparently.
...and maybe other files.
Nope. If they use the enum, changing the enum is enough !
Logged
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #10 on: 26. June 2007, 03:29:11 PM »

Quote
Well, I suppose, you have also added an enum constant to the OpenGLLayer enum (and returned it in the getType() method of your new CanvasPeer implementation)? If not, please do so. Then you can simply use the Xith3DTestLauncher, select the new OpenGLLayer and run any testcase.
Ok I try it.
I need also to modify DisplayOptions.java, DisplayModeSelector.java and Canvas3DFactory.java apparently.
...and maybe other files.
Nope. If they use the enum, changing the enum is enough !
I tried but my qt layer (JOGL_QT) isn't visible in the layer list of the Xith3DTestLauncher. Huh
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1185



View Profile WWW Email
« Reply #11 on: 26. June 2007, 04:06:09 PM »

Strange :s
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4064


May the 4th, be with you...


View Profile WWW
« Reply #12 on: 26. June 2007, 05:02:02 PM »

Ok I try it.
I need also to modify DisplayOptions.java, DisplayModeSelector.java and Canvas3DFactory.java apparently.
...and maybe other files.
Nope. If they use the enum, changing the enum is enough !
[/quote]

Well, for now it will suffice.

I tried but my qt layer (JOGL_QT) isn't visible in the layer list of the Xith3DTestLauncher.

They are not yet auto-filled unfortunately. Please go into org.xith3d.utility.launching.DisplayOptions (xith-tk) line #350 and add it to the array.

Marvin
Logged
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #13 on: 09. August 2007, 04:01:46 PM »

Hi again !

I think i can post my Qtjambi canvas implementation now.
It's still not perfect, but it works.
I also post an example program that you can use with this canvas peer.
CanvasPeerImplQtJambi.java
Vue3D.java (program example)

Off course, you need to get Qt Jambi to use it : http://trolltech.com/developer/downloads/qt
Get the Open source or Trial version of QtJambi.
To make it work inside Eclipse, you have two solutions:

To test it, make a new java project, then paste these two java files into.
Then you need to SET THE CORRECT PATH FOR "CanvasPeerImplQtJambi" in the OpenGLLayer (CanvasPeerImplQtJambi.java, line 47).

You also need to setup the java buid path for this project:
  • Add xith3D and xithTK projects
  • add  JOGL.jar and QtJambi.jar libraries
  • if you don't have installed the qtjambi integration plugin, add also the native libraries jar file to the build path
That's all, it should works now. Cool



This canvas implementation is still bugged. Roll Eyes
I'm not satisfied with the way each frame is rendered ( see line 481:            QApplication.invokeLater(renderRunnable); ). It's sometimes too slow. Sad
Other bug: the application is not stopping itself when closing the main window.
I think the loop thread is not destroyed; -> the destroy() method is never called. Embarrassed

Marvin, you adviced me recently to implement the GLEventListener for avoiding threads problems.
But i can't use it because this interface implements methods for an AWT or a Swing canvas.
And i can't use an awt or swing element with Qtjambi. It's not compatible (but it's on their roadmap).


Thank you for your help, and i hope that you'll help me to fix bugs ! Smiley
« Last Edit: 09. August 2007, 09:39:11 PM by Ludo » Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4064


May the 4th, be with you...


View Profile WWW
« Reply #14 on: 09. August 2007, 07:51:46 PM »

Great. I will test it in a few minutes...

Marvin
Logged
Pages: [1] 2 3 4
Print
Jump to:  

Theme orange-lt created by panic