Obsolete! See Building CEGUI instead. ๐
This is how I updated Ogre v1.2 source code with Cegui v0.5.0 source code. Please update this Wiki as new versions are released and discuss any problems on the message board.
The following lines needed to be modified:
- OgreCEGUITexture.h, Line 109
- virtual void loadFromMemory(const void* buffPtr, uint buffWidth, uint buffHeight, PixelFormat pixelFormat = CEGUI::Texture::PF_RGBA);
- OgreCEGUITexture.cpp, Line 144
- void OgreCEGUITexture::loadFromMemory(const void* buffPtr, uint buffWidth, uint buffHeight, PixelFormat pixelFormat)
- OgreCEGUITexture.cpp, Line 167
- d_ogre_texture = TextureManager::getSingleton().loadRawData(getUniqueName(), "General", odc, buffWidth, buffHeight, pixelFormat == CEGUI::Texture::PF_RGB ? PF_R8G8B8 : PF_A8R8G8B8, TEX_TYPE_2D, 0, 1.0f);
These samples are broken as Cegui v0.5.0 is restructuring its code:
- Demo_Gui
- Demo_FacialAnimation
- Demo_Compositor
- Demo_Ocean
Add to ogrenew/Samples/Common/bin/Debug/resources.cfg:
- FileSystem=../../../Media/datafiles/configs
- FileSystem=../../../Media/datafiles/fonts
- FileSystem=../../../Media/datafiles/imagesets
- FileSystem=../../../Media/datafiles/layouts
- FileSystem=../../../Media/datafiles/looknfeel
- FileSystem=../../../Media/datafiles/lua_scripts
- FileSystem=../../../Media/datafiles/schemes
NOTE: This worked better by placing them AFTER the already existing entries
UpdateOgreCegui.bat
Copy to clipboard
@echo off REM Copy the Cegui v0.5.0 source code into the Ogre v1.2 source code REM The environment variables OGRE_SRC and CEGUI_SRC will be used REM unless parameters are passed. REM UpdateOgreCEGUI.bat [<path to ogre source> <path to cegui source>] REM OGRE_SRC needs to point to the ogrenew directory REM It contains (among others): REM ogrenew\Ogre_vc8.sln REM ogrenew\OgreMainREM ogrenew\Samplesif not [%1] == [] set OGRE_SRC=%1 if [%OGRE_SRC%] == [] (echo OGRE_SRC is not set or wrong parameter goto end) REM CEGUI_SRC needs to point to the cegui_mk2 directory REM It contains (among others): REM cegui_mk2\binREM cegui_mk2\SamplesREM cegui_mk2\srcif not [%2] == [] set CEGUI_SRC=%2 if [%CEGUI_SRC%] == [] (echo CEGUI_SRC is not set or wrong parameter goto end) echo Deleting old files... rmdir /q /s %OGRE_SRC%\Dependencies\include\CEGUI >NUL 2>NUL del /q %OGRE_SRC%\dependencies\lib\debug\CEGUI*.lib >NUL 2>NUL del /q %OGRE_SRC%\dependencies\lib\release\CEGUI*.lib >NUL 2>NUL del /q %OGRE_SRC%\Samples\Common\CEGUIRenderer\lib\OgreGUIRenderer* >NUL 2>NUL del /q %OGRE_SRC%\Samples\Common\bin\debug\CEGUI* >NUL 2>NUL del /q %OGRE_SRC%\Samples\Common\bin\debug\OgreGUIRenderer* >NUL 2>NUL del /q %OGRE_SRC%\Samples\Common\bin\release\CEGUI* >NUL 2>NUL del /q %OGRE_SRC%\Samples\Common\bin\release\OgreGUIRenderer* >NUL 2>NUL del /q %OGRE_SRC%\samples\media\gui\*.xsd >NUL 2>NUL del /q %OGRE_SRC%\samples\media\gui\Taharez*.* >NUL 2>NUL echo . echo Ensuring directory structure is correct... mkdir %OGRE_SRC%\Dependencies\include\CEGUI>NUL mkdir %OGRE_SRC%\Dependencies\include\CEGUI\elements>NUL mkdir %OGRE_SRC%\Dependencies\include\CEGUI\falagard>NUL echo . echo Copying new files... xcopy /Y /E %CEGUI_SRC%\include\*.h %OGRE_SRC%\Dependencies\include\CEGUI >NUL xcopy /Y %CEGUI_SRC%\lib\CEGUIBase_d.lib %OGRE_SRC%\dependencies\lib\debug >NUL xcopy /Y %CEGUI_SRC%\lib\CEGUIBase.lib %OGRE_SRC%\dependencies\lib\release >NUL xcopy /Y %CEGUI_SRC%\lib\CEGUIFalagardWRBase_d.lib %OGRE_SRC%\dependencies\lib\debug >NUL xcopy /Y %CEGUI_SRC%\lib\CEGUIFalagardWRBase.lib %OGRE_SRC%\dependencies\lib\release >NUL xcopy /Y %CEGUI_SRC%\bin\CEGUIBase_d.dll %OGRE_SRC%\Samples\Common\bin\Debug >NUL xcopy /Y %CEGUI_SRC%\bin\CEGUIBase.dll %OGRE_SRC%\Samples\Common\bin\Release >NUL xcopy /Y %CEGUI_SRC%\bin\CEGUIFalagardWRBase_d.dll %OGRE_SRC%\Samples\Common\bin\Debug >NUL xcopy /Y %CEGUI_SRC%\bin\CEGUIFalagardWRBase.dll %OGRE_SRC%\Samples\Common\bin\Release >NUL xcopy /Y %CEGUI_SRC%\bin\CEGUIXercesParser_d.dll %OGRE_SRC%\Samples\Common\bin\Debug >NUL xcopy /Y %CEGUI_SRC%\bin\CEGUIXercesParser.dll %OGRE_SRC%\Samples\Common\bin\Release >NUL xcopy /Y %CEGUI_SRC%\dependencies\bin\xerces-c_2_7D.dll %OGRE_SRC%\Samples\Common\bin\Debug >NUL xcopy /Y %CEGUI_SRC%\dependencies\bin\xerces-c_2_7.dll %OGRE_SRC%\Samples\Common\bin\Release >NUL xcopy /Y /E /I %CEGUI_SRC%\Samples\datafiles\*.* %OGRE_SRC%\Samples\Media\datafiles >NUL echo . echo All done! :end pause