can't compile OGRE Renderer
Moderators: CEGUI MVP, CEGUI Team
Re: can't compile OGRE Renderer
Ok I've committed that change. Thanks for pointing it out.
Re: can't compile OGRE Renderer
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.
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.
Re: can't compile OGRE Renderer
I also have that issue, but I was referencing the Material for the nodes, maybe it is related.
May the Force be with you!
Re: can't compile OGRE Renderer
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
Re: can't compile OGRE Renderer
Ok, I tried the latest version and it seems pretty solid... My double TexturePtr delete thing seems to be cleared up now.. Good job!
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Re: can't compile OGRE Renderer
Hmmm, I started getting a strange error, and I remembered something Spoke had written in his patch description:
I then found the offending line of code in OgreTexture.cpp:
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
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
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: can't compile OGRE Renderer
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.
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.
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Re: can't compile OGRE Renderer
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.
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.
Re: can't compile OGRE Renderer
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.
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!
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: can't compile OGRE Renderer
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
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.
Re: can't compile OGRE Renderer
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'.
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!
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: can't compile OGRE Renderer
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.
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.
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Re: can't compile OGRE Renderer
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.
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.
Re: can't compile OGRE Renderer
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.
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.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: can't compile OGRE Renderer
_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
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 2 guests