Page 5 of 6

Re: The Development of CEGUI 0.7.x

Posted: Sat Aug 15, 2009 12:14
by radical-dev
Hi CEGUI-Team!

I've spotted another problem, but i don't know if it just depends on my programming skills or it is a bug.

Here's some code:

Code: Select all

/* CGameManager.h: */

#include <CEGUIIrrlichtResourceProvider.h>
...
using namespace CEGUI;
...
static IrrlichtResourceProvider*   m_CEIrrResProvider;
...

/* CGameManager.cpp: */

IrrlichtResourceProvider*   CGameManager::m_CEIrrResProvider = 0;
...
m_CEIrrRenderer = &IrrlichtRenderer::create( *m_IrrDevicePtr ); // IrrDevicePtr is valid

if ( !m_CEIrrRenderer )
{
  Shutdown();
  return 0;
}

m_CESystemPtr = &System::create( *m_CEIrrRenderer );
         
if ( !m_CESystemPtr )
{
  Shutdown();
  return 0;
}

m_CEIrrResProvider = static_cast<IrrlichtResourceProvider*>( &m_CEIrrRenderer->createIrrlichtResourceProvider( *m_IrrDevicePtr->getFileSystem() ));
m_CEIrrResProvider->setResourceGroupDirectory( "global", "data/gui/" );
CEGUI::Imageset::setDefaultResourceGroup( "global" );
CEGUI::Font::setDefaultResourceGroup( "global" );
CEGUI::Scheme::setDefaultResourceGroup( "global" );
CEGUI::WidgetLookManager::setDefaultResourceGroup( "global" );
CEGUI::WindowManager::setDefaultResourceGroup( "global" );
         
SchemeManager::getSingleton().create( "TaharezLook.scheme", "global" );
...   


So far so good, but at the last line it doesn't find the scheme:

Code: Select all

CEGUI::InvalidRequestException in file d:\sdk\ceguitrunk_rev2156\cegui\src\ceguidefaultresourceprovider.cpp(63) : DefaultResourceProvider::load - TaharezLook.scheme does not exist


Tried to set the data path to "data/gui/" & "/data/gui" & "/data/gui/" but makes no difference.

I haven't found a function to set the IrrlichtResourceProvider as DefaultResourceProvider, is there one?

CEGUI-Version: v0.6.9999 - Rev 2156
Irrlicht-Version: 1.5.1

Re: The Development of CEGUI 0.7.x

Posted: Sat Aug 15, 2009 16:07
by CrazyEddie
Bugs? How very dare you! :lol:

I haven't found a function to set the IrrlichtResourceProvider as DefaultResourceProvider, is there one?

This is basically where your issue lies. What you have to do is construct your IrrlichtResourceProvider prior to creating the system object, and pass a pointer to your resource provider as a second parameter to the System::create function:

Code: Select all

    static System& create(Renderer& renderer,
                          ResourceProvider* resourceProvider = 0,
                          XMLParser* xmlParser = 0,
                          ImageCodec* imageCodec = 0,
                          ScriptModule* scriptModule = 0,
                          const String& configFile = "",
                          const String& logFile = "CEGUI.log");


I intend to add some 'helper' functions to the Irrlicht renderer, the same as what I have done for Ogre, that basically allow you to bootstrap the system for the commonest cases without needing to do that creation manually (so eventually you'll be able to call IrrlichtRenderer::bootstrapSystem with your irrlicht device, and this will create the renderer, resource provider and system objects for you :)

CE.

Re: The Development of CEGUI 0.7.x

Posted: Sat Aug 15, 2009 23:05
by radical-dev
Hi CE!

that truly did the trick :). Looked at all classes despite the System::create() :D

Thanks again for your fast help...i'll be back soon for sure ;)

Greetings

radical

Re: The Development of CEGUI 0.7.x

Posted: Sun Aug 30, 2009 16:53
by CrazyEddie
This afternoon I have branched the code for the 0.7.x releases. The branch name is 'v0-7'. The code in this branch is now exceptionally close to what will be released in a couple of weeks as version 0.7.0 - to be known as "The warts an' all release" :P

CE.

Re: The Development of CEGUI 0.7.x

Posted: Tue Sep 01, 2009 08:32
by CrazyEddie
For your viewing pleasure, I present a CEGUI based web browser video using the 0.7.0 code:


CE.

Re: The Development of CEGUI 0.7.x

Posted: Tue Sep 01, 2009 17:43
by Jamarr
you are CRAZY! that is awsome. what browser library are you using for that? 0.7 is gonna be sweet :)

Re: The Development of CEGUI 0.7.x

Posted: Tue Sep 01, 2009 19:54
by CrazyEddie
That is done using llmozlib (http://ubrowser.com/) which kind of wraps and 'friendlies up' the Mozilla / Gecko engine a little.

I wrote this entirely using basic CEGUI APIs (and hitting the underlying OpenGL in a couple of places) - so what you see there is implemented via existing CEGUI windows using ordinary events; I did not create a new Window type nor WindowRenderer to do this. Also note that while this uses OpenGL as the renderer there's nothing to stop it working with the other renderers too.

This is part of a series of things I'm going to try - mainly for my own satisfaction - to see what kind of stuff is possible :) What I might do here once 0.7.0 is out, is clean this up a bit and have it as a separately available demo. I'll keep it separate mainly because of the Mozilla and llmozlib dependencies.

CE.

Re: The Development of CEGUI 0.7.x

Posted: Wed Sep 02, 2009 22:17
by Mikademus
Seriously, this is inspiring stuff!

Re: The Development of CEGUI 0.7.x

Posted: Thu Sep 03, 2009 18:48
by CrazyEddie
Seriously, this is inspiring stuff!

Fun too :)

Ok. I have uploaded the 0.7.0 documentation to the site (download documentation packages not publicly available yet), if anyone can spot any obvious clangers and let me know over the next couple of days that would be great: http://www.cegui.org.uk/docs/0.7.0/ (btw, I know many of the links in the "obtaining the code" page do not work, but they will one the packages are built and uploaded :P)

CE.

Re: The Development of CEGUI 0.7.x

Posted: Thu Sep 03, 2009 23:27
by Mikademus
Only thing I saw at a quick scan was that you might consider adding a notice in the beginners' guide to input injection section that additional injector may be coming.

Otherwise, it seems like solid work.

Re: The Development of CEGUI 0.7.x

Posted: Fri Sep 04, 2009 10:48
by CrazyEddie
Hmm. I'm not certain about adding that info directly to the tutorial itself - I acknowledge it's relevance, but I think those tutorials are best kept as clean as possible. I also think, however, it might be good to have an additional page that mentions confirmed or proposed future features and changes; nothing so formal as a roadmap, but more a loose collection of ideas, suggestions and such. Thanks for the idea :)

[Edit @ 2030 on 5th Sep 2009]
I have now updated the docs with a new version - the only changes are a fix to mac SDK name and a new page that briefly mentions some of the planned and considered upcoming changes.

CE.

Re: The Development of CEGUI 0.7.x

Posted: Thu Sep 10, 2009 10:56
by CABAListic
I've recently switched to the 0.7 branch, nice work :) But I have two remaining issues at present.

1) setDisplaySize does not work correctly for the Ogre renderer.
My application can resize its primary render window, and when I do so I evidently want to reflect the resolution change to CEGUI. So I'm calling System::notifyDisplaySizeChanged with the new resolution, but this does not work correctly, the CEGUI output afterwards becomes distorted. The setDisplaySize function of the Ogre renderer does indeed state a "FIXME" in the comments, so I guess that function isn't quite finished :)

2) Comboboxes don't close correctly.
I have a settings dialog with several options concerning graphics. At the top, there is a combobox with a list of available resolutions, and directly below it are some more elements, checkboxes for fullscreen, vsync, and some more comboboxes for texture filtering etc.. Now, when I click on the resolution combobox, the dropdown menu with my list of resolutions opens (as expected), and this list naturally overlaps the control elements below it (also as expected). Now, I select one of the resolutions, and the combobox is closed again. But only visually, it seems, because when I try to use any of the elements below the resolution combobox (i. e. select one of the checkboxes), they don't react, because they don't seem to get the input. It appears as if the combobox is still occupying this particular screen area.

Re: The Development of CEGUI 0.7.x

Posted: Thu Sep 10, 2009 12:07
by CrazyEddie
Hi,

Thanks for reporting the issues; I have one day left in which to fix them - and I'll try my best!

I've not looked into the first issue at the moment, the FIXME - at least in theory - should be unrelated, but then again, we will have to see. When you say 'distorted', could you give any additional description (or screenshots - they're always useful)?

The second issue, I can confirm. It's related to the fact the widget height includes the size of the list, once you activate the combobox it's bought to the front of the z-order and subsequently 'obscures' underlying windows from mouse inputs. I'm not certain how this got broken :oops:

CE.

Re: The Development of CEGUI 0.7.x

Posted: Thu Sep 10, 2009 12:35
by CABAListic
Yes, I guess screenshots are in order. The following two screenshots show part of my menus in the initial screen resolution (800x600):
http://www.sectormania.de/cegui_menu1.jpg
http://www.sectormania.de/cegui_menu2.jpg

Then I resize the renderwindow to 1024x768, and this is what I get:
http://www.sectormania.de/cegui_menu3.jpg
http://www.sectormania.de/cegui_menu4.jpg

As you can see, the rendering area is not resized at all, it's still occupying the previous 800x600 pixels from before the resize. Plus the rendering is totally screwed in some way :)

I'd have investigated this myself, but since I'm not familiar with the CEGUI internals, I'm hoping you'll have an easier time with this one. If I can help any way, let me know :)

Re: The Development of CEGUI 0.7.x

Posted: Thu Sep 10, 2009 14:03
by CrazyEddie
I've fixed the combobox issue, and confirmed an issue with the Ogre renderer and display resizing - basically we're not updating the viewports when we should. My quick and dirty fix solved the issue, though my 'cleaned up' version for public consumption is currently segfaulting :) I will resolve this and commit the final fix a bit later this evening when I get back home.

Thanks again for raising the issues :)

CE.