can't compile OGRE Renderer

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
_mental_
CEGUI Team (Retired)
Posts: 157
Joined: Wed Jan 12, 2005 12:06
Contact:

Re: can't compile OGRE Renderer

Postby _mental_ » Mon Jan 31, 2005 04:49

Ok I've committed that change. Thanks for pointing it out.

User avatar
pjcast
Quite a regular
Quite a regular
Posts: 47
Joined: Wed Jan 12, 2005 12:06

Re: can't compile OGRE Renderer

Postby pjcast » Mon Jan 31, 2005 06:45

Awesome... I'll check it out later when it becomes available in anonymous cvs...

I think it might of been causing a resource crash when shutting down... Some ogre texture is being freed twice or something.. Though, I'm not positive if it is related to my Ogre/Cegui texture.. I'll keep lookin on that one.

User avatar
Spoke
Quite a regular
Quite a regular
Posts: 48
Joined: Wed Jan 12, 2005 12:06
Location: Spain
Contact:

Re: can't compile OGRE Renderer

Postby Spoke » Mon Jan 31, 2005 13:51

I also have that issue, but I was referencing the Material for the nodes, maybe it is related.
May the Force be with you!

User avatar
_mental_
CEGUI Team (Retired)
Posts: 157
Joined: Wed Jan 12, 2005 12:06
Contact:

Re: can't compile OGRE Renderer

Postby _mental_ » Mon Jan 31, 2005 18:24

hrm.. let me know what you find. I did a few tests before committing this code and didn't get any problems, but that doesn't mean there isn't an issue :)

User avatar
pjcast
Quite a regular
Quite a regular
Posts: 47
Joined: Wed Jan 12, 2005 12:06

Re: can't compile OGRE Renderer

Postby pjcast » Tue Feb 01, 2005 02:38

Ok, I tried the latest version and it seems pretty solid... My double TexturePtr delete thing seems to be cleared up now.. Good job!

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: can't compile OGRE Renderer

Postby spannerman » Thu Feb 03, 2005 20:02

Hmmm, I started getting a strange error, and I remembered something Spoke had written in his patch description:

I didn´t modify the interface so the default group for resources is 'General' maybe a group called 'CEGUI' could be better or a new constructor parameter to allow the
user to say which Resource group he/she want to use.


I then found the offending line of code in OgreTexture.cpp:

Code: Select all

d_ogre_texture = TextureManager::getSingleton().load(filename.c_str(), "General", TEX_TYPE_2D, 0, 1.0f);


This obviously will mean only resources from the hard coded group 'General' can be used with CEGUI...which is needless to say pretty limiting since people cant take advantage of much of the new features the OGRE resource system has added.

Was wondering if you guys Spoke, Eddie or _mental_ or anyone has started / attempted to resolve this? Otherwise I can give it a go and write a patch :shock:

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: can't compile OGRE Renderer

Postby CrazyEddie » Fri Feb 04, 2005 09:34

Hmmm. I've not done anything with regards to this.

I guess we could have a setting in the OgreResourceProvider that allows the user to specify a resource group, though this may be a bit klunky :?

CE.

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: can't compile OGRE Renderer

Postby spannerman » Fri Feb 04, 2005 10:08

That sounds like a good idea, although it may mean users will have to keep swapping the resource groups around to do what they want, but that may be the best solution. Perhaps another solution would be to search all available resourcegroups for the requested file? I guess if we are going to have this error when the resource is not found, we might as well search all available groups before crashing?

This is an OGRE specific thing, so I decided not to amend the existing methods to do what I wanted.
Instead, in the OGRE renderer I have created a couple of seperate methods to deal with using specific resource groups. Its a very simple solution, as I have basically cloned the createTexture and loadImage methods, except with a parameter to pass in the name of the resource group.
It works for me, and means the existing functionality doesnt change.

I'd like to hear what _mental_ has to say about this too, otherwise I can supply this simple patch which at least lets people get resources from different groups perhaps as a temporary solution.

User avatar
Spoke
Quite a regular
Quite a regular
Posts: 48
Joined: Wed Jan 12, 2005 12:06
Location: Spain
Contact:

Re: can't compile OGRE Renderer

Postby Spoke » Fri Feb 04, 2005 20:10

I´m currently toying with the new resource system, so I have everything on General but some resources on bootstrap.

Thinking about this I decide that the best aproach to keep the Media folder a little sort was to group related resources together, so I think I will go for the Contructor parameter on the OgreRenderer.

I also think that depending on the user´s resource organization searching all the groups could be a huge waste of time....think about the user having like 100 groups or so. (I know that´s better that failing, hehe)

We can also extend the current interface and provide a new parameter for the textures which indicates what group should be used, but I don´t know if this will fit with the other renderes. :?
May the Force be with you!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: can't compile OGRE Renderer

Postby CrazyEddie » Fri Feb 04, 2005 21:00

spannerman wrote:
I guess if we are going to have this error when the resource is not found, we might as well search all available groups before crashing?

Don't you mean before you catch the exception and gracefully try something else? No, wait, you had it right the first time :lol:

I think all of these issues can be handled in some way via the resource provider; it's probably not necessary to have anthing in the OgreRenderer, and I definately do not want 'Ogreisms' to start permeating the API/Engine neutral parts of the system.

What might be an idea is to have an enum which defines classes of resources that CEGUI uses (so, imagesets, textures, font definitions, 'ttf' font files, layouts, xsd schema files, and 'other' for anything else). We could extend the resource provider 'load' methods to take the class of resource being loaded and each concrete resource provider is then free to ignore or interpret these resource classes as is appropriate. For the Ogre resource provider, there could be a method to assign a resource group to each resource class; these would defaut to the General group, but the user is free to customise this as they see fit. Reasonably simple to implement, keeps things clean and generic, and is customisable where it matters...

CE.

User avatar
Spoke
Quite a regular
Quite a regular
Posts: 48
Joined: Wed Jan 12, 2005 12:06
Location: Spain
Contact:

Re: can't compile OGRE Renderer

Postby Spoke » Sun Feb 06, 2005 08:43

Why don´t add an optional parameter to the scripts and let each resource providers handle or ignore it?

It will provide more control than an enum, since that will mean you must group same resource types in the same group.

On the emun side we can also tell which groups a resource type should be searched in, like search for fonts in 'General', 'GUI', and 'Level1'.
May the Force be with you!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: can't compile OGRE Renderer

Postby CrazyEddie » Sun Feb 06, 2005 11:48

Hi Spoke,

This sounds like a possibility :) Having the ability to specify this in the datafiles also means that nothing related to resource groups (or whatever) needs to be hard coded (unless the user wants to do that, in which case that would be supported via the same interface).

I'll think about this a little more and make a final decision in a day or so...

CE.

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: can't compile OGRE Renderer

Postby spannerman » Sun Feb 06, 2005 21:28

Cool, looking forward to anything you decide to go with :)

Since I have quite a personal need for this (I do have a hacky solution for now to get me by) I volunteer to test anything out for you if you need.

User avatar
_mental_
CEGUI Team (Retired)
Posts: 157
Joined: Wed Jan 12, 2005 12:06
Contact:

Re: can't compile OGRE Renderer

Postby _mental_ » Tue Feb 08, 2005 03:20

Sorry I'm joining this late, been really burnt out with the 1.0RC release plus the baby keeping me up all night :)

Anyway I like the idea of being able to group resources within the XML files as it may also be useful for other renderers down the line.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: can't compile OGRE Renderer

Postby CrazyEddie » Tue Feb 08, 2005 09:12

_mental_ wrote:
Sorry I'm joining this late, been really burnt out with the 1.0RC release plus the baby keeping me up all night :)

:shock: Sounds fun!

Anyway I like the idea of being able to group resources within the XML files as it may also be useful for other renderers down the line.

This is the approach I'll take; it should be in and ready for testing a bit later on this week.

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 16 guests