Page 5 of 5

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

Posted: Sun May 04, 2014 10:56
by Ident
Looks very good!

I commented on the pull request and on one part of the code, please take a look.

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

Posted: Wed Sep 03, 2014 05:56
by tahsmith
Hi All,

Checking out CEGUI and Ogre 2.0 for a rewrite of a project that was written in CEGUI 0.7 and Ogre 1.7.

I have reproduced as much as I have seen here with the default branch of the repo code. I can load up the Ogre sample browser with the OpenGL backend, but it crashes quite soon after loading.

Can't get this far with the D3D11 Ogre backend, this crashed before the loading screen with compliation failures in the the HLSL code.

A bunch of these are typos is looks like, i.e., the `output` variable is actally `o`. Some of the others seem to be more serious.

Is this a known bug with CEGUI? I notice on the wiki it says that the Ogre D3D11 backend needs a bit of love. Is this still the case?
If it only needs a bit of work, I think I know a guy to do it.

I built Ogre and CEGUI from the head of each repo on Windows 8.1, Win64 target with VS2013 and the dependencies compiled from the respective dependencies repos.

Code: Select all

15:46:33: OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D11 high-level shader __cegui_internal_texture_vs__ Errors:
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1E04A9B0(19,9): error X3004: undeclared identifier 'output'
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1E04A9B0(19,2): error X3080: 'main': function must return a value
 in D3D11HLSLProgram::loadFromSource at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 502)
15:46:34: High-level program __cegui_internal_texture_vs__ encountered an error during loading and is thus not supported.
OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D11 high-level shader __cegui_internal_texture_vs__ Errors:
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1E04A9B0(19,9): error X3004: undeclared identifier 'output'
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1E04A9B0(19,2): error X3080: 'main': function must return a value
 in D3D11HLSLProgram::loadFromSource at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 502)
15:46:34: OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D11 high-level shader __cegui_internal_texture_ps__ Errors:
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1DD0DA40(11,13): error X3523: DX9-style intrinsics are disabled when not in dx9 compatibility mode.
 in D3D11HLSLProgram::loadFromSource at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 502)
15:46:34: High-level program __cegui_internal_texture_ps__ encountered an error during loading and is thus not supported.
OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D11 high-level shader __cegui_internal_texture_ps__ Errors:
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1DD0DA40(11,13): error X3523: DX9-style intrinsics are disabled when not in dx9 compatibility mode.
 in D3D11HLSLProgram::loadFromSource at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 502)
15:46:34: OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D11 high-level shader __cegui_internal_colour_vs__ Errors:
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1DD20DE0(16,9): error X3004: undeclared identifier 'output'
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1DD20DE0(16,2): error X3080: 'main': function must return a value
 in D3D11HLSLProgram::loadFromSource at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 502)
15:46:34: High-level program __cegui_internal_colour_vs__ encountered an error during loading and is thus not supported.
OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D11 high-level shader __cegui_internal_colour_vs__ Errors:
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1DD20DE0(16,9): error X3004: undeclared identifier 'output'
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1DD20DE0(16,2): error X3080: 'main': function must return a value
 in D3D11HLSLProgram::loadFromSource at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 502)
15:46:34: OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D11 high-level shader __cegui_internal_colour_ps__ Errors:
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1E02B9C0(9,29): error X4502: invalid ps_5_0 output semantic 'COLOR'
 in D3D11HLSLProgram::loadFromSource at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 502)
15:46:34: High-level program __cegui_internal_colour_ps__ encountered an error during loading and is thus not supported.
OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D11 high-level shader __cegui_internal_colour_ps__ Errors:
C:\Users\tahsmith\Desktop\cegui\build\sdk\bin\Shader@0x0000006D1E02B9C0(9,29): error X4502: invalid ps_5_0 output semantic 'COLOR'
 in D3D11HLSLProgram::loadFromSource at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 502)

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

Posted: Wed Sep 03, 2014 06:35
by Ident
The Ogre Renderer using D3D11 is not supported at all in default branch. I only fixed the OpenGL3 Renderer at some point (it could be broken due to Ogre3D changes again though - I am using some older version based off default on my PC). If you want to make the CEGUIOgreRenderer run with Direct3D 11, it shouldnt be too difficult. Please make a Pull Request, see: https://bitbucket.org/cegui/cegui
And also make a new thread so we can discuss all changes, so whenever you have issues I will help you. We are also often on #cegui on Freenode IRC.

You should be able to reuse the shader code from the D3D11 Renderer of CEGUI. I recently rewrote that renderer entirely. Some variable names etc might have to be adapted of course but the idea and code should probably be the same.