Horde3D http://horde3d.org/forums/ |
|
Using QGraphicsView with Horde http://horde3d.org/forums/viewtopic.php?f=1&t=988 |
Page 1 of 1 |
Author: | hs0 [ 22.10.2009, 13:44 ] |
Post subject: | Using QGraphicsView with Horde |
Since rendering with Horde and QT is easy possible via the QGLWidget, Volker asked wether it is usable via the QGraphicsView interface, which would allow the drawing of QWidgets ontop of Horde3d! I spent some time on this but I can't figure it out, i used the post by "Marseyeah" (just click the link) http://www.ogre3d.org/forums/viewtopic. ... 25#p350047 who was able to embed ogre into that system... I used the files here: http://www.ogre3d.org/forums/viewtopic. ... 50#p350566 but still there are the following problems: 1 Horde renders, but complex render pipelines are not possible (don't ask why, simple forward and deferred shading is possible, but my HDR and SSAO pipeline crashes under this setup) 2 now widgets are shown wenn horde rendering is enabled... if somebody is interested in rendering to the QGraphicsView thing, he might use this approach to see if its working, and maybe he can give some advice? thanks, hs0 |
Author: | Volker [ 22.10.2009, 16:00 ] |
Post subject: | Re: Using QGraphicsView with Horde |
Did I understand it right, you have a working example, the only problem is that it crashes with complex pipelines? Where does it crash? In Horde, in Qt or somewhere in the graphics driver? I only had a quick look at the post from Marseyeah, (s)he suggest to use two contexts. Since Horde does not create a context itself, that should be a little bit different in our case. I guess you may have problems with OpenGL states, that may be adjusted by Qt. Therefore I guess we either have to save the states somewhere after calling the Horde3D render method and restore them after Qt's rendering or add a quick hack to horde to set all required OpenGL states at the beginning of the rendering method. I hadn't the time to dig into this problem myself, so all comments are only theoretical thoughts. |
Author: | hs0 [ 22.10.2009, 16:26 ] |
Post subject: | Re: Using QGraphicsView with Horde |
uuh i hate it because all of a sudden all the pipelines work now, however the widgets drawn on top are not showing when rendering with horde is enabled... as it crashed it was somewhere in the code that created new render targets, but i wouldn't be sure about that because it doesn't occure now... how do you safe such states? and which states are relevant? at the moment i'm trying the "makeCurrent" changes suggested by Marseyeah, and thats not having any effect thanks for your reply, hs0 |
Author: | Volker [ 22.10.2009, 17:01 ] |
Post subject: | Re: Using QGraphicsView with Horde |
I guess the makeCurrent thing is only relevant if you have more than one context. Saving states can be done using glPushAttrib and glPopAttrib. As you wrote in the other thread, it seems like Qt requires some of the GL states set to some special things, since h3dInit seem to make the OpenGL context to be impossible to use by Qt. But without debugging into both the initialization code and the Horde code, I can't give you a more detailed answer. Theoretically it should be possible to combine QGraphicsView and Horde, the only problem is the prerequisites both components have to the OpenGL states and if one of them destroys e.g. render targets of the other one. |
Author: | DIMEDROLL [ 21.02.2012, 00:14 ] |
Post subject: | Re: Using QGraphicsView with Horde |
Did anybody had luck here? I'm facing the same problem |
Author: | Christoph [ 26.02.2012, 13:56 ] |
Post subject: | Re: Using QGraphicsView with Horde |
I did. I used QDeclarativeItem instead of QGraphicsItem, but it should be easy to port. See Integrating Horde3D with QtQuick 1.0. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |