1

What I want is a Qt Application that uses Horde3D to display a 3d scene and draw QWidgets on top of the 3D scene using Horde3D(or OpenGL).

Basically I want to add UI for my 3D scene. And this UI should be drawn using OpenGL.

I've successfully followed this tutorial: Accelerate your Widgets with OpenGL, and this one Tutorial - Setup Horde with Qt4.

But when I try to combine them I can see my 3D scene, but no UI controls. I'm using QGraphicsView, QGraphicsScene and and QGLWidget with Horde3d. If I don't use Horde3D(I mean don't init it) then my UI controls are rendered correctly.

I face the same problem stated on Horde3D forums.

How do I solve it?

Dmitriy
  • 5,357
  • 8
  • 45
  • 57
  • The Qt UI disappearing is something I have encountered when forgetting to reset the OpenGL state before Qt's rendering. – cgmb Feb 22 '13 at 10:09
  • 1
    By the way, I should really mention that [performance is pretty terrible with QGraphicsProxyWidgets](http://swik.net/Trolltech/Trolltech+Labs+Blogs/Qt+Graphics+and+Performance+-+The+Cost+of+Convenience/djej7). It is very difficult to make them work nicely on an OpenGL-backed scene, and handle inputs properly. Believe me, I've tried. – cgmb Feb 23 '13 at 01:35

1 Answers1

1

The most important thing when you draw using drawBrackground() to perform OpenGL rendering using Horde3D is that GL state has to be preserved, make sure that you save GL state before and restore after rendering the Horde3D scene.

Sundar Iyer
  • 59
  • 1
  • 4