Horde3D

Next-Generation Graphics Engine
It is currently 28.03.2024, 10:12

All times are UTC + 1 hour




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: OVERLAY QUESTIONS
PostPosted: 03.10.2007, 16:44 
Offline

Joined: 03.10.2007, 10:31
Posts: 11
Location: Pittsburgh
I am trying to figure out the best way to make a basic menu using the Horde 3D Overlays. Any help on finding tutorials or basic c++ code samples would be wonderful.

I was thinking of usiing crazy eddie's GUI

http://www.cegui.org.uk/wiki/index.php/Main_Page

It seems to use XML, interfaces with OpenGL, and the SDL library. Does Horde have these features built in or do I need something like this?

Thanks
eddie


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 16.04.2008, 00:28 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
There's nothing like that integrated in Horde3D. The only thing Horde3D provides for the realization of 2D gui elements is the rendering of text and texture overlays.


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 16.04.2008, 03:10 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
eddie wrote:
I was thinking of usiing crazy eddie's GUI
http://www.cegui.org.uk/wiki/index.php/Main_Page

You should be able to use CEGUI directly with Horde. You can either write a Horde renderer back-end for CEGUI, or you should be able to use the OpenGL renderer it comes with, and draw the GUI after you call Horde3D::render(), before you swap the buffers.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 16.04.2008, 03:29 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
I can attest that using the CEGUI OpenGL renderer works fine with Horde. Same with LibUFO, if you make the canvas transparent.


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 16.04.2008, 19:43 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
swiftcoder wrote:
eddie wrote:
I was thinking of usiing crazy eddie's GUI
http://www.cegui.org.uk/wiki/index.php/Main_Page

You should be able to use CEGUI directly with Horde. You can either write a Horde renderer back-end for CEGUI, or you should be able to use the OpenGL renderer it comes with, and draw the GUI after you call Horde3D::render(), before you swap the buffers.


Maybe a little tutorial on the wiki is in order ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 16.04.2008, 21:37 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
DDd wrote:
Maybe a little tutorial on the wiki is in order ;)

I haven't actually tested it yet, but maybe AcidFaucet will be able to write a quick one. It should be exactly as simple as my instructions though, because there is zero integration to take care of - CEGUI and Horde each deal directly with OpenGL, and GEGUI gets its events directly from your app (probably from GLFW).

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 17.04.2008, 03:14 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
swiftcoder is right, CEGUI is braindead easy to get working, too bad its not so easy to actually use. I could whip up an example using it for a GUI in Horde.

LibUFO on the other hand isn't braindead easy to get working, but is braindead easy to use. A tutorial/sample would be relevant for it, especially since its really great for creating tools inside of your application.

I'm currently halfway through writing up all the stuff I did to the terrain material and getting it working with different lighting possibilities, so I'll tackle something GUI related on the Wiki either when I've got that up or need a break from terrain.


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 15.06.2008, 13:37 
Offline

Joined: 15.06.2008, 11:21
Posts: 166
Location: Germany
I tried to use CEGUI with Horde3D, but it doesn't display anything. It does try to render the quads though using the OpenGL renderer, they just aren't shown. Did I make any obvious mistake?

Code:
http://rafb.net/p/JNWmc881.html
CEGUI.log:
http://rafb.net/p/cf5uhz66.html

Ubuntu Linux 8.04 (amd64)
Horde 0.15 (trying it with the new version now)
CEGUI 0.5.0

EDIT: Seems as if Horde sets some OpenGL parameters in a way that the restore code of CEGUI's renderer cannot create a state where CEGUI can render correctly.
AcidFaucet, maybe you can tell how you did that?


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 08.01.2009, 01:20 
Offline

Joined: 13.12.2008, 17:43
Posts: 6
Hi!
I have the same problem as phoenix does.
I use Horde and glfw to produce everything. If I try to open a hello World CEGUI window nothing happens, only the CEGUI rendering takes about 4 seconds. If I throw out all the Horde stuff everything works fine.
Can anybody help me with this?

Cheers


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 08.01.2009, 03:17 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
Use the direct to frame buffer renderer. LibUFO is generally more fun to use.


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 08.01.2009, 08:03 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
I need a break from game engine coding, so I'll start working on some basic GUI demos (AntTweakBar, LibUFO, CEGUI)modifying knight demo properties and finish up my native horde gui.


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 08.01.2009, 12:02 
Offline

Joined: 13.12.2008, 17:43
Posts: 6
As far as I know CEGUI comes with renderers for DirectX, OpenGL, Irrlicht and Ogre.
So far I used the OpenGL renderer. How can I render directly to the frame buffer then?


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 08.01.2009, 13:17 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
Sorry, bad joke. A blitter would be pitifully slow. Though there is a directfbrenderer, that'd be useless.

If you could post your CEGUI initialization code, or PM it to me, I could take a look at it. CEGUI has some quirks where you have to clear certain bindings that interfere sometimes.

I've got an AntTweakBar demo done, I'm working on the HUD tutorial, and next it's LibUFO, CEGUI is at the bottom of my list because it's a pain in the butt. Might be able to get everything done but the tutorial done by the end of today (in US EST time).


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 08.01.2009, 20:54 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
Okay I've fished out the problem. It's buffer stickiness.

a void Horde3D::clearBinds() should be added to the api which calls Modules::renderer().clearBuf() which executes glBindBuffer( GL_ARRAY_BUFFER, 0); Which should be called before CEGUI or anything else with similar issues executes its draw command.

That keeps things friendly.

Attachment:
KnightCEGUI.jpg
KnightCEGUI.jpg [ 79.85 KiB | Viewed 17239 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 09.01.2009, 22:48 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
@AcidFaucet: Great that you are giving GUI integration a try. But I think we shouldn't add functions as your clearBinds to the API since the API acts on a much higher abstraction level. What we could do instead is setting all states to good default values after the rendering has finished. The best place for this is in Renderer::finishRendering.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 60 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