Horde3D

Next-Generation Graphics Engine
It is currently 22.12.2024, 02:00

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 22.10.2009, 13:44 
Offline

Joined: 15.08.2009, 11:34
Posts: 10
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 :)


Top
 Profile  
Reply with quote  
PostPosted: 22.10.2009, 16:00 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: 22.10.2009, 16:26 
Offline

Joined: 15.08.2009, 11:34
Posts: 10
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


Top
 Profile  
Reply with quote  
PostPosted: 22.10.2009, 17:01 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: 21.02.2012, 00:14 
Offline

Joined: 11.12.2009, 12:59
Posts: 19
Did anybody had luck here? I'm facing the same problem


Top
 Profile  
Reply with quote  
PostPosted: 26.02.2012, 13:56 
Offline

Joined: 09.02.2012, 22:38
Posts: 26
I did. I used QDeclarativeItem instead of QGraphicsItem, but it should be easy to port. See Integrating Horde3D with QtQuick 1.0.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group