[Request] Make the OgreRenderer work with the new Ogre 2.0

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

Boost113
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Sat Apr 12, 2014 09:44

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Boost113 » Sun Apr 13, 2014 12:20

Ident wrote:change only those lines that have tabs into spaces, which you actually modify. otherwise it will look a mess in the diff. thanks for considering this.

Multi-screen capability is something i havent thought about. thats a valid point. however, since cegui was changed to have GUIContexts for multi-target rendering, it is definitely laid out for such purposes. In D3D11 and OpenGL it is up to the user to render each GUIContext to the right framebuffer, so there it is definitely posible to do this already. Setting up a shared OpenGL context is of course out of the domain of CEGUI and something that the user has to care about. If Ogre offers this out of the box then this is definitely a nice thing.


From the looks of things it seems that when the time to render comes ALL the contexts are drawn, I think I'm going to try to do something to associate a Renderer to each context and only update when their renderer calls the

Code: Select all

System::getSingleton().renderAllGUIContextsOnTarget(d_owner);
method with the pointer (d_owner) being OgreRenderer.

User avatar
Ident
CEGUI Team
Posts: 1964
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Ident » Sun Apr 13, 2014 12:29

We are aware of this. However those tabs can often not just be replaced by 4 whitespaces without messing up the alignment so we would have to manually replace all in all files at one point. Either way, do as you will, but I suggest to just replace the tabs in those lines you modify.
CrazyEddie: "I don't like GUIs"

Boost113
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Sat Apr 12, 2014 09:44

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Boost113 » Sun Apr 13, 2014 13:46

I have now finished the changes. But I haven't tested them.
Do the samples work in the v0 branch, so that I can test whether it works or not using them?

I didn't create a pull request yet but the code is here:
https://bitbucket.org/Boost113/cegui-for-ogre-v2-0/commits/all

I didn't touch other components too much, yet. The function for drawing contexts based on Renderer needs to be redone.
This requires me to change contexts to have Renderer pointer in them, this shouldn't break existing code if I use first Renderer as a default.

User avatar
Ident
CEGUI Team
Posts: 1964
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Ident » Sun Apr 13, 2014 14:24

v-0 should work fine and is stable.

Once you tested your changes please create a pull request https://confluence.atlassian.com/displa ... l+requests
CrazyEddie: "I don't like GUIs"

Boost113
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Sat Apr 12, 2014 09:44

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Boost113 » Sun Apr 13, 2014 14:52

I had some trouble trying to enable the samples. CMake told me that the samples are disables because "Ogre dependecies (boost libraries)" were missing.
What I actually was missing was OIS. I added a different error message for it (I'll let this, too, be in the pull request)
"Added a nice(r) error message to disabling the samples, it telling that Boost libraries are missing is misleading"
https://bitbucket.org/Boost113/cegui-for-ogre-v2-0/commits/1a031319280eb8ee9b017c2858b74f4f121fdffa

I'll post soon how the samples run...

User avatar
Ident
CEGUI Team
Posts: 1964
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Ident » Sun Apr 13, 2014 16:20

Ah, i wasnt aware of this. I will later check if this should also be patched into v0-8
CrazyEddie: "I don't like GUIs"

Boost113
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Sat Apr 12, 2014 09:44

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Boost113 » Sun Apr 13, 2014 16:48

Now that I got it running it's complaining about missing dlls even after I copied everything from the "share", ogre "media" and all the bin folders to the executable folder.
The one specifically is libexpat_d.dll which is weird since the name of that is expat_d.dll, I have no clue why this happens...
I'll try renaming to see if it gets fixed.

EDIT: renaming fixed it, is dependencies package using the wrong name for building?

Next issue is that

Code: Select all

SamplesFramework::loadSamplesDataFromXML: loading of sample data from file 'C:/Users/OEM/Documents/Visual Studio 2010/Projects/cegui-for-ogre-v2-0/datafiles/samples/samples.xml' has failed.

That /samples folder doesn't exist, is this some old thing? Anyways fixed this by copying the samples folder from install directory.

User avatar
Ident
CEGUI Team
Posts: 1964
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Ident » Sun Apr 13, 2014 16:56

Boost113 wrote:EDIT: renaming fixed it, is dependencies package using the wrong name for building?

The problem never occured to me. How did you build your CEGUI dependencies? Did you get them from repo?

Boost113 wrote:Next issue is that

Code: Select all

SamplesFramework::loadSamplesDataFromXML: loading of sample data from file 'C:/Users/OEM/Documents/Visual Studio 2010/Projects/cegui-for-ogre-v2-0/datafiles/samples/samples.xml' has failed.

That /samples folder doesn't exist, is this some old thing? Anyways fixed this by copying the samples folder from install directory.

It works if you install CEGUI, if you don't then you need to copy the samples directory. I agree this sucks. I am the only "real" Windows user in the dev team and have no idea how to fix this in a correct and acceptable way, hacking it is not okay and may screw up CMake on the other OS's. We will likely handle the samples differently in the future though so this problem might disappear as a side-effect of that anyways.
CrazyEddie: "I don't like GUIs"

Boost113
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Sat Apr 12, 2014 09:44

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Boost113 » Sun Apr 13, 2014 16:59

Ident wrote:How did you build your CEGUI dependencies?


From the mercurial repository, revision:

Code: Select all

Revision: 62
Changeset: 0c0f90b7744331be437d5b5c5003b9172187e620 [0c0f90b77443]
Parents: 61
Author: Lukas Meindl <bitbucket@lukasmeindl.at>
Date: 26. maaliskuuta 2014 22:45:13
Labels: tip


Now I got it to actually start rendering stuff, crashing under

Code: Select all

    OgreMain_d.dll!Ogre::Root::renderOneFrame()  Line 1002 + 0x8 bytes   C++

promising...

User avatar
Ident
CEGUI Team
Posts: 1964
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Ident » Sun Apr 13, 2014 17:02

I edited my last post.

Relating to your new error: no debug symbols for Ogre available?

Regarding the dependency package: it hasn't happened to me that it required the dll in that name. I use "expat.dll" and "expat_d.dll".. Which VS version did you use? Did you have the same issue with other dependency libs?
CrazyEddie: "I don't like GUIs"

Boost113
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Sat Apr 12, 2014 09:44

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Boost113 » Sun Apr 13, 2014 17:02

It works if you install CEGUI, if you don't then you need to copy the samples directory. I agree this sucks. I am the only "real" Windows user in the dev team and have no idea how to fix this in a correct and acceptable way, hacking it is not okay and may screw up CMake on the other OS's. We will likely handle the samples differently in the future though so this problem might disappear as a side-effect of that anyways.


How I do this in my project is having cmake copy all the resources to the build/bin directory,
that way I don't have to copy anything manually opposed to having to copy the libraries and the resources for debugging.

User avatar
Ident
CEGUI Team
Posts: 1964
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Ident » Sun Apr 13, 2014 17:08

Boost113 wrote:How I do this in my project is having cmake copy all the resources to the build/bin directory,
that way I don't have to copy anything manually opposed to having to copy the libraries and the resources for debugging.


Unfortunately that is not an option in our case. The only "correct" way is to have it installed. The same issue applies to the generated header files.
CrazyEddie: "I don't like GUIs"

Boost113
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Sat Apr 12, 2014 09:44

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Boost113 » Sun Apr 13, 2014 17:08

Ident wrote:I edited my last post.

Relating to your new error: no debug symbols for Ogre available?

Regarding the dependency package: it hasn't happened to me that it required the dll in that name. I use "expat.dll" and "expat_d.dll".. Which VS version did you use? Did you have the same issue with other dependency libs?


I'm using Visual Studio 2010 Ultimate. All the other dependencies worked just fine with their default names.

The actual place where it crashes is:

Code: Select all

    void CompositorWorkspace::_swapFinalTarget(void)
    {
        if( mRenderWindow.target )
            mRenderWindow.target->swapBuffers();
    }


Due to

Code: Select all

CEGUISampleFramework-0.9999_d.exe: 0xC0000005: Access violation reading location 0x000000bc.


So I probably haven't properly created the workspace/forgot to initialize some texture somewhere.

Boost113
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Sat Apr 12, 2014 09:44

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Boost113 » Sun Apr 13, 2014 17:14

Even though it crashes before ending the frame it is able to draw something:

Image

User avatar
Ident
CEGUI Team
Posts: 1964
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Request] Make the OgreRenderer work with the new Ogre 2

Postby Ident » Sun Apr 13, 2014 17:22

Rendering looks 100% correct at least.
CrazyEddie: "I don't like GUIs"


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 0 guests