[Qt-jambi-interest] QGLwidget.renderText(...) hangs my app
Gunnar Sletta
gunnar at trolltech.com
Wed Mar 5 13:56:01 CET 2008
moebius at altern.org wrote:
> Hi everybody,
>
> I'm currently experimenting a quite strange problem.
>
> I've subclassed a QGLWidget to make my own 3D viewer. I use JOGL as
> rendering engine as described in HelloGL example. Everything goes fine
> excepted for displaying some text into my 3D view.
>
> The problematic code is :
> glColor3f(1.0f, 1.0f, 1.0f);
> renderText(0.0, 0.0, 1.0, new String("Z"), font);
Hi,
I added this small diff to the HelloGL example that we have and it runs
fine on my machine. Are you doing your GL code as part of the virtual
paintGL() or somewhere else?
==== //depot/qtjambi/4.4.0_01/com/trolltech/demos/HelloGL.java#1 -
c:\depot\qtjambi-4.4.0_01\com\trolltech\demos\HelloGL.java ====
@@ -131,6 +131,10 @@
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);
+
+ func.glLoadIdentity();
+ func.glColor3f(1, 1, 1);
+ renderText(50, 50, "RandomFoo!!!");
}
@Override
More information about the Qt-jambi-interest
mailing list