Horde3D

Next-Generation Graphics Engine
It is currently 27.11.2024, 07:49

All times are UTC + 1 hour




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 10.01.2009, 01:24 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
Didn't even cross my mind that there was the frame rendering had an end. :oops: Definitely the best place to put it.


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 11.01.2009, 18:58 
Offline

Joined: 13.12.2008, 17:43
Posts: 6
Hey!
Since it's GUI time these days I have another question:
Has anybody ever used AGAR with Horde3D?
I get the same behaviour as with CEGUI (doesn't seem to be able to render
in the SDL window - if I leave all Horde code out it works fine) but the
buffer clearing trick doesn't work now.
Any suggestions?

Thanks in advance,

Booomy


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 16.01.2009, 10:31 
Offline

Joined: 13.12.2008, 17:43
Posts: 6
Figured out how to render Agar content after Horde3d::init() was called:
A little extra method in egMain helps:

Code:
DLLEXP bool switchShader()
   {
      Modules::renderer().setShader(0x0);
      return true;
   }


After compiling that again it works if Horde3D::switchShader() is called before rendering
the Agar content. Looks like some weird shader is loaded within Horde3d::init().
Still haven't figured out how to render Agar stuff after Horde3d::render(_cam) was called.
The screen remains black after that.
Any help would be appreciated ;-)


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 11.05.2009, 07:53 
Offline

Joined: 17.02.2009, 21:21
Posts: 17
marciano wrote:
@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.


Am I right in assuming all I need to do is add
Code:
glBindBuffer( GL_ARRAY_BUFFER, 0);
to Render::finishRendering to get CEGUI's openGL renderer working? I have CEGUI::System::getSingleton().renderGUI(); right after Horde3D::render( _cam ); and before Horde3D::finalizeFrame(); in my main loop. Currently I am using the glBindBuffer line in my finishRendering() function,but my CEGUI window is not appearing. Here's my init code for CEGUI:
Code:
myRenderer =
   new CEGUI::OpenGLRenderer( 0, 800,600 );
   new CEGUI::System( myRenderer );
   rp = static_cast<CEGUI::DefaultResourceProvider*>(
   CEGUI::System::getSingleton().getResourceProvider());

       //absolute paths
   rp->setResourceGroupDirectory("schemes", "C:/Users/Tyler/Documents/UCD/Computer_Animation/Muse/Data/CEGUI/datafiles/schemes/");
   rp->setResourceGroupDirectory("imagesets", "C:/Users/Tyler/Documents/UCD/Computer_Animation/Muse/Data/CEGUI/datafiles/imagesets/");
   rp->setResourceGroupDirectory("fonts", "C:/Users/Tyler/Documents/UCD/Computer_Animation/Muse/Data/CEGUI/datafiles/fonts/");
   rp->setResourceGroupDirectory("layouts", "C:/Users/Tyler/Documents/UCD/Computer_Animation/Muse/Data/CEGUI/datafiles/layouts/");
   rp->setResourceGroupDirectory("looknfeels", "C:/Users/Tyler/Documents/UCD/Computer_Animation/Muse/Data/CEGUI/datafiles/looknfeel/");
   rp->setResourceGroupDirectory("lua_scripts", "C:/Users/Tyler/Documents/UCD/Computer_Animation/Muse/Data/CEGUI/datafiles/lua_scripts/");

   CEGUI::Imageset::setDefaultResourceGroup("imagesets");
   CEGUI::Font::setDefaultResourceGroup("fonts");
   CEGUI::Scheme::setDefaultResourceGroup("schemes");
   CEGUI::WidgetLookManager::setDefaultResourceGroup("looknfeels");
   CEGUI::WindowManager::setDefaultResourceGroup("layouts");
   CEGUI::ScriptModule::setDefaultResourceGroup("lua_scripts");

   // load in the scheme file, which auto-loads the TaharezLook imageset
CEGUI::SchemeManager::getSingleton().loadScheme( "TaharezLook.scheme" );

// load in a font.  The first font loaded automatically becomes the default font.
if(! CEGUI::FontManager::getSingleton().isFontPresent( "Commonwealth-10" ) )
  CEGUI::FontManager::getSingleton().createFont( "Commonwealth-10.font" );

CEGUI::System::getSingleton().setDefaultFont( "Commonwealth-10" );
CEGUI::System::getSingleton().setDefaultMouseCursor( "TaharezLook", "MouseArrow" );
CEGUI::System::getSingleton().setDefaultTooltip( "TaharezLook/Tooltip" );

CEGUI::WindowManager& wmgr = WindowManager::getSingleton();
myRoot = wmgr.createWindow( "DefaultWindow", "root" );
System::getSingleton().setGUISheet( myRoot );
fWnd = (FrameWindow*)wmgr.createWindow( "TaharezLook/FrameWindow", "testWindow" );
myRoot->addChildWindow( fWnd );
// position a quarter of the way in from the top-left of parent.
fWnd->setPosition( UVector2( UDim( 0.25f, 0 ), UDim( 0.25f, 0 ) ) );

// set size to be half the size of the parent
fWnd->setSize( UVector2( UDim( 0.5f, 0 ), UDim( 0.5f, 0 ) ) );
fWnd->setText( "Hello World!" );


The above code comes before Horde3D::init()


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 12.05.2009, 05:21 
Offline

Joined: 17.02.2009, 21:21
Posts: 17
OK I found out what needs to go in the Renderer::finishRendering function to get CEGUI to display correctly in my application. I first should note that I am using software rendering which may be why using just glBindBuffer() didnt work for me. Adding glUseProgram(0) disables the vertex and fragment shaders from use by the GPU and returns openGL to fixed functionality.

Code:
void Renderer::finishRendering()
{
   ASSERT( glGetError() == GL_NO_ERROR );
   glUseProgram(0);
   glBindBuffer( GL_ARRAY_BUFFER, 0);
}


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 31.05.2009, 10:32 
Offline

Joined: 15.02.2009, 02:13
Posts: 161
Location: Sydney Australia
Hi All,

I've been thinking for awhile that maybe considering the clutter toolkit could be a good candidate for a GUI overlay system. Basically clutter is developed by openhand/intel and is essentially the future library which will most likely feature in GTK 3 one day (what gnome runs on). It most likely is very much overkill for basic GUI's for games but could be very handy if you wanted a very rich editor UI and it ties in well with freedesktop standards, also it is LGPL.

Just an idea :)

http://clutter-project.org/

_________________
-Alex
Website


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 01.06.2009, 00:12 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
aargh, libufo just burnt my eyes out with its awful screenshots! :)

CEGUI: ah, good old CEGUI. Man it bites so badly too :)

I've searched far and wide for a nice GUI library and to be honest, I cant find one. Not a single one that really works well, has support for theming and is easy to use (and not tied to a particular render API).

Now THAT is an open source project worth doing. Only plenty have tried :)


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 01.06.2009, 04:59 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
zoombapup wrote:
I've searched far and wide for a nice GUI library and to be honest, I cant find one. Not a single one that really works well, has support for theming and is easy to use (and not tied to a particular render API).

Now THAT is an open source project worth doing. Only plenty have tried :)
<rant>
The main issue here is that GUI code is horrifically hard to write, and your average guy who starts his own GUI library just doesn't have the knowledge and experience to pull it off. Even many of the larger UI toolkits (GTK+, wxWindows, Carbon, etc.) have truly horrific APIs and are very inflexible in their layout, etc.

Game programmers want it all: a GUI that is trivial to use, can be skinned to produce any result, and looks good with minimal effort. Sadly, this is not at all trivial. A good GUI toolkit requires careful software engineering, continual testing and feedback from both developers and end users, a competent artist to consult on design issues...

If you truly want an in-game GUI that can do everything, use Awesomium, and be prepared to spend a lot of time tweaking html and stylesheets.
</rant>

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 01.06.2009, 16:37 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
I'm using awesomium right now actually (with Ogre) and even that has issues. Mainly to do with smooth animation of menu's and framerate drop.

GUI's arent REALLY that hard to write. Theyre just hard to write in a way that works well and has flexibility and render api independance. I've worked with a ton of different GUI's and even enjoyed a couple of them, but they were proprietary and did take up a fair amount of programmer time.

Of course game GUI's have a different feature set than your "windowing toolkit" style GUI's so I'm not really talking about those so much. I'm talking about the CEGUI/MyGUI/BetaGUI/GLUI/GLAM/? style ones.

Actually, weirdly enough, a mixture of MyGUI, the GUI from clanlib and another one whose name slips my mind right now would be pretty nice. One had nice function binding (using delegates), the other had nice transition effects (via mutators) and the other had nice theming support (via a sort of CSS style interface).


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 03.06.2009, 06:43 
Offline

Joined: 10.04.2008, 09:13
Posts: 86
I've been fiddling a bit with GameSWF, an open source flash renderer for OpenGL. If you bring a lot of money you can use Scaleform, a high end commercial port of GameSWF.


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 03.06.2009, 07:52 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
jimbo wrote:
I've been fiddling a bit with GameSWF, an open source flash renderer for OpenGL. If you bring a lot of money you can use Scaleform, a high end commercial port of GameSWF.
I've used an evaluation copy of ScaleformGFx before - it was very impressive :D We used it to prototype game ideas (as Flash files) inside an existing game engine.
I didn't know it had links back to existing open source projects though.


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 03.06.2009, 16:40 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
The guy behind Awesomium also has a flash renderer: http://princeofcode.com/akarui.php#overview

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: OVERLAY QUESTIONS
PostPosted: 21.07.2009, 19:35 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
zoombapup wrote:
I'm using awesomium right now actually (with Ogre) and even that has issues. Mainly to do with smooth animation of menu's and framerate drop.
The next version of Awesomium is supposed to have very major performance improvements.

_________________
Tristam MacDonald - [swiftcoding]


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

All times are UTC + 1 hour


Who is online

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