ogre3d: [WIP] Update to 1.11.1

This commit is contained in:
Alexey Pavlov
2018-07-20 15:58:28 +03:00
parent 3a549c1248
commit 4b664d8a2d
12 changed files with 228 additions and 607 deletions

View File

@@ -0,0 +1,20 @@
--- ogre-1.11.1/CMake/Utils/PrecompiledHeader.cmake.orig 2018-07-20 14:28:10.807064900 +0300
+++ ogre-1.11.1/CMake/Utils/PrecompiledHeader.cmake 2018-07-20 14:28:40.431516900 +0300
@@ -80,7 +80,7 @@
item MATCHES "/usr/include$")
# workaround for GCC 6.x bug
else()
- LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
+ LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix} \"${item}\"")
endif()
ENDFOREACH(item)
@@ -90,7 +90,7 @@
item MATCHES "/usr/include$")
# workaround for GCC 6.x bug
else()
- LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
+ LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix} \"${item}\"")
endif()
ENDFOREACH(item)

View File

@@ -0,0 +1,13 @@
--- ogre-1.11.1/PlugIns/FreeImageCodec/CMakeLists.txt.orig 2018-07-20 15:54:05.023608000 +0300
+++ ogre-1.11.1/PlugIns/FreeImageCodec/CMakeLists.txt 2018-07-20 15:54:35.318861300 +0300
@@ -11,7 +11,9 @@
list(APPEND HEADER_FILES ${CMAKE_BINARY_DIR}/include/OgreFreeImageCodecExports.h)
set(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/OgreFreeImageCodec.cpp")
-add_definitions(-DFREEIMAGE_LIB)
+if (NOT MINGW)
+ add_definitions(-DFREEIMAGE_LIB)
+endif ()
add_library(Codec_FreeImage ${OGRE_LIB_TYPE} ${HEADER_FILES} ${SOURCES})
target_link_libraries(Codec_FreeImage PUBLIC OgreMain "${FreeImage_LIBRARIES}")
target_include_directories(Codec_FreeImage PUBLIC

View File

@@ -0,0 +1,11 @@
--- ogre3d-1.9.0/CMake/Packages/FindDirectX11.cmake.orig 2013-12-20 22:02:56.585400000 +0400
+++ ogre3d-1.9.0/CMake/Packages/FindDirectX11.cmake 2013-12-20 22:02:59.674200000 +0400
@@ -100,7 +100,7 @@
# look for D3D11 components
find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS ${DirectX11_INC_SEARCH_PATH})
- find_library(DirectX11_DXERR_LIBRARY NAMES DxErr HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
+ find_library(DirectX11_DXERR_LIBRARY NAMES DxErr dxerr9 HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
find_library(DirectX11_DXGUID_LIBRARY NAMES dxguid HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
find_library(DirectX11_DXGI_LIBRARY NAMES dxgi HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
find_library(DirectX11_D3DCOMPILER_LIBRARY NAMES d3dcompiler HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})

View File

@@ -0,0 +1,23 @@
--- ogre3d-1.9.0.r6969.f40744b1106a/RenderSystems/Direct3D11/include/OgreD3D11Texture.h.orig 2015-02-17 10:17:20.838400000 +0300
+++ ogre3d-1.9.0.r6969.f40744b1106a/RenderSystems/Direct3D11/include/OgreD3D11Texture.h 2015-02-17 10:17:25.768000000 +0300
@@ -31,6 +31,7 @@
#include "OgreTexture.h"
#include "OgreRenderTexture.h"
#include "OgreSharedPtr.h"
+#include "OgreD3D11Device.h"
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined(_WIN32_WINNT_WIN8)
#ifndef USE_D3DX11_LIBRARY
--- ogre3d-1.9.0.r6969.f40744b1106a/RenderSystems/Direct3D11/include/OgreD3D11Device.h.orig 2015-02-17 10:17:20.838400000 +0300
+++ ogre3d-1.9.0.r6969.f40744b1106a/RenderSystems/Direct3D11/include/OgreD3D11Device.h 2015-02-17 10:17:25.768000000 +0300
@@ -30,6 +30,10 @@
#include "OgreD3D11Prerequisites.h"
+#if (_WIN32_WINNT < 0x600)
+#define _WIN32_WINNT 0x600
+#endif
+#include <windows.h>
namespace Ogre
{

View File

@@ -0,0 +1,12 @@
--- ogre3d-2.0.0.r7490.07ad8061ec8d/RenderSystems/Direct3D11/CMakeLists.txt.orig 2015-02-17 17:14:01.858800000 +0300
+++ ogre3d-2.0.0.r7490.07ad8061ec8d/RenderSystems/Direct3D11/CMakeLists.txt 2015-02-17 17:14:34.821600000 +0300
@@ -31,6 +31,9 @@
if(OGRE_PROFILING AND DirectX9_FOUND)
target_link_libraries(RenderSystem_Direct3D11 ${DirectX9_LIBRARY})
endif()
+if (MINGW)
+ target_link_libraries(RenderSystem_Direct3D11 psapi)
+endif ()
if(WINDOWS_STORE OR WINDOWS_PHONE)
set_target_properties(RenderSystem_Direct3D11 PROPERTIES VS_WINRT_COMPONENT "true")

View File

@@ -0,0 +1,79 @@
--- ogre3d-1.11.1/CMake/CMakeLists.txt.orig 2015-02-18 06:49:28.643600000 +0300
+++ ogre3d-1.11.1/CMake/CMakeLists.txt 2015-02-18 06:50:00.389600000 +0300
@@ -13,7 +13,7 @@
# directory, but can also be used for custom projects.
#############################################################
-if(WIN32 OR APPLE)
+if(MSVC OR APPLE)
set(OGRE_CMAKE_DIR "CMake")
else()
set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
--- ogre3d-1.11.1/Docs/CMakeLists.txt.orig 2015-02-18 06:46:47.946600000 +0300
+++ ogre3d-1.11.1/Docs/CMakeLists.txt 2015-02-18 06:47:05.325000000 +0300
@@ -13,9 +13,9 @@
###############################################################
# Set docs target directory
-if (WIN32 OR APPLE)
+if (MSVC OR APPLE)
set(OGRE_DOCS_PATH "Docs")
-elseif (UNIX)
+elseif (UNIX OR MINGW)
set(OGRE_DOCS_PATH "share/OGRE/docs")
endif ()
--- ogre3d-1.11.1/CMake/InstallResources.cmake.orig 2015-02-18 06:34:55.206800000 +0300
+++ ogre3d-1.11.1/CMake/InstallResources.cmake 2015-02-18 06:42:48.448400000 +0300
@@ -12,7 +12,7 @@
##################################################################
if (WIN32)
- set(OGRE_MEDIA_PATH "Media")
+ set(OGRE_MEDIA_PATH "share/OGRE/Media")
set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
set(OGRE_TEST_MEDIA_DIR_REL "../Tests/${OGRE_MEDIA_PATH}")
set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/bin")
@@ -242,7 +242,7 @@
# Create the CMake package files
include(CMakePackageConfigHelpers)
-if(WIN32 OR APPLE)
+if(MSVC OR APPLE)
set(OGRE_CMAKE_DIR "CMake")
else()
set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
--- ogre3d-1.11.1/CMake/ConfigureBuild.cmake.orig 2015-02-18 06:56:58.156600000 +0300
+++ ogre3d-1.11.1/CMake/ConfigureBuild.cmake 2015-02-18 06:58:52.333000000 +0300
@@ -148,9 +148,13 @@
endif ()
# Create the pkg-config package files on Unix systems
-if (UNIX)
+if (UNIX OR MINGW)
set(OGRE_PLUGIN_PREFIX "")
- set(OGRE_PLUGIN_EXT ".so")
+ if (MINGW)
+ set(OGRE_PLUGIN_EXT ".dll")
+ else()
+ set(OGRE_PLUGIN_EXT ".so")
+ endif()
set(OGRE_PAGING_ADDITIONAL_PACKAGES "")
if (OGRE_STATIC)
set(OGRE_PLUGIN_PREFIX "lib")
--- ogre3d-1.11.1/Samples/Media/CMakeLists.txt.orig 2015-02-18 13:59:42.807600000 +0300
+++ ogre3d-1.11.1/Samples/Media/CMakeLists.txt 2015-02-18 13:59:57.800200000 +0300
@@ -12,11 +12,11 @@
###############################################################
# Set media target directory
-if (WIN32)
+if (MSVC)
set(OGRE_MEDIA_PATH "media")
elseif (APPLE)
set(OGRE_MEDIA_PATH "Media")
-elseif (UNIX)
+elseif (UNIX OR MINGW)
set(OGRE_MEDIA_PATH "share/OGRE/Media")
endif ()

View File

@@ -1,157 +1,100 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=ogre3d
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.9.0
pkgrel=5
pkgver=1.11.1
pkgrel=1
pkgdesc="A cross-platform 3D game engine (mingw-w64)"
arch=('any')
url="http://www.ogre3d.org/"
license=("LGPL")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-cmake" "mercurial")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-doxygen"
"${MINGW_PACKAGE_PREFIX}-pkg-config"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-swig")
depends=("${MINGW_PACKAGE_PREFIX}-boost"
"${MINGW_PACKAGE_PREFIX}-cppunit"
"${MINGW_PACKAGE_PREFIX}-FreeImage"
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-glsl-optimizer"
"${MINGW_PACKAGE_PREFIX}-hlsl2glsl"
"${MINGW_PACKAGE_PREFIX}-nvidia-cg-toolkit"
"${MINGW_PACKAGE_PREFIX}-ois"
"${MINGW_PACKAGE_PREFIX}-tinyxml"
"${MINGW_PACKAGE_PREFIX}-winpthreads"
"${MINGW_PACKAGE_PREFIX}-zlib"
"${MINGW_PACKAGE_PREFIX}-zziplib"
#"${MINGW_PACKAGE_PREFIX}-intel-tbb"
)
"${MINGW_PACKAGE_PREFIX}-cppunit"
"${MINGW_PACKAGE_PREFIX}-FreeImage"
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-glsl-optimizer"
"${MINGW_PACKAGE_PREFIX}-hlsl2glsl"
"${MINGW_PACKAGE_PREFIX}-intel-tbb"
"${MINGW_PACKAGE_PREFIX}-openexr"
"${MINGW_PACKAGE_PREFIX}-SDL2"
"${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-tinyxml"
"${MINGW_PACKAGE_PREFIX}-winpthreads"
"${MINGW_PACKAGE_PREFIX}-zlib"
"${MINGW_PACKAGE_PREFIX}-zziplib")
options=('staticlibs' '!strip') # '!buildflags'
source=("${_realname}-${pkgver}.tar.xz"{,.sig}
ogre-1.9.0-fix-cflags.patch
ogre-endlessworld-fix.patch
ogre-freeimage-fix.patch
use-mingw-w64-directx.patch
mingw-w64-fix.patch
fix-using-locale.patch
)
md5sums=('7c128aa1bfb5f8793bc2f4c3a09edd0a'
'SKIP'
'a2cbfc846906bbb80c7b05d2d60a2779'
'3c00c5584a8edcb4dc07a57697a73d59'
'166486655cd358be175f3b32b63e0ca5'
'07a29692ee7b30b90c8388af865078da'
'56477180dc083746de83ea2aae3efd90'
'591434cd5990dcad2ba21e5791c44029')
_buildtype=RelWithDebInfo
# source PKGBUILD && mksource
mksource() {
[[ -x /usr/bin/hg ]] || (echo "hg not found. Install mercurial." && return 1)
__hgroot='https://bitbucket.org/sinbad'
__hgrepo='ogre'
__hgbranch='default'
__hgrev="v1-9"
hg clone -u ${__hgrev} "${__hgroot}/${__hgrepo}/" ${__hgrepo}
#hg clone -b ${__hgbranch} "${__hgroot}${__hgrepo}#${__hgrev}" ${__hgrepo}
pushd ${__hgrepo}
if (( $(hg id -n) < $(hg id -nr ${__hgbranch}) )); then
printf 'You are not building the latest revision!\n'
printf "Consider updating __hgrev to $(hg id -r ${__hgbranch}).\n"
fi
popd
mv ${__hgrepo} ${_realname}-${pkgver}
find ${_realname}-${pkgver} -depth -type d -name .hg -exec rm -rf {} \;
rm ${_realname}-${pkgver}/{.hgignore,.hgtags}
tar -cJf ${_realname}-${pkgver}.tar.xz ${_realname}-${pkgver}/*
rm -r ${_realname}-${pkgver}
gpg --detach-sign ${_realname}-${pkgver}.tar.xz
#scp ${pkgname}-${pkgver}.tar.xz nym:/srv/ftp/other/vim/
#scp ${pkgname}-${pkgver}.tar.xz.sig nym:/srv/ftp/other/vim/
}
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/OGRECave/ogre/archive/v${pkgver}.tar.gz"
001-fix-precompiled-headers-generate.patch
002-link-shared-freeimage.patch
004-use-mingw-w64-directx.patch
010-missing-include.patch
012-add-link-library.patch
014-custom-install.patch)
md5sums=('1350f06365f76fb33ebf143df78e7dfe'
'430ea6f1f657371af18d559f590ef5b9'
'27bd95dd0b84090ca0ec5edc565dcc6a'
'c19a9f7b44c16e55a5a2b0167bbc16f3'
'2ada87678777366fa9cdcb5e7d12b650'
'769784029b7059ef89da7ec0186da9cd'
'37367ff06ccb4ba34e4ffb9ed07d31a5')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i ${srcdir}/ogre-1.9.0-fix-cflags.patch
patch -p0 -i ${srcdir}/ogre-endlessworld-fix.patch
patch -p1 -i ${srcdir}/ogre-freeimage-fix.patch
patch -p1 -i ${srcdir}/use-mingw-w64-directx.patch
patch -p1 -i ${srcdir}/mingw-w64-fix.patch
patch -p1 -i ${srcdir}/fix-using-locale.patch
cd "${srcdir}/ogre-${pkgver}"
patch -p1 -i ${srcdir}/001-fix-precompiled-headers-generate.patch
patch -p1 -i ${srcdir}/002-link-shared-freeimage.patch
patch -p1 -i ${srcdir}/004-use-mingw-w64-directx.patch
patch -p1 -i ${srcdir}/010-missing-include.patch
patch -p1 -i ${srcdir}/012-add-link-library.patch
patch -p1 -i ${srcdir}/014-custom-install.patch
}
build() {
mkdir -p ${pkgdir}${MINGW_PREFIX}
pushd ${pkgdir}${MINGW_PREFIX} > /dev/null
export PREFIX_WIN=`pwd -W`
popd > /dev/null
local -a extra_config
if check_option "debug" "y"; then
extra_config+=( -DCMAKE_BUILD_TYPE=Debug )
else
extra_config+=( -DCMAKE_BUILD_TYPE=Release )
fi
pushd ${MINGW_PREFIX} > /dev/null
export PREFIX_DEPS=`pwd -W`
popd > /dev/null
rm -rf ${srcdir}/build-${MINGW_CHOST}
mkdir build-${MINGW_CHOST} && cd build-${MINGW_CHOST}
case ${MINGW_CHOST} in
i686*)
local _march=pentium4 #i686
local _tune=generic #generic
;;
x86_64*)
local _march=core2
local _tune=nocona
;;
esac
export CFLAGS="-O2 -pipe -march=${_march} -mtune=${_tune}"
export CXXFLAGS="-O2 -pipe -march=${_march} -mtune=${_tune}"
export DXSDK_DIR=${PREFIX_DEPS}/${MINGW_CHOST}
mkdir ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST}
${MINGW_PREFIX}/bin/cmake.exe \
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX" \
${MINGW_PREFIX}/bin/cmake.exe \
-G"MSYS Makefiles" \
-DCMAKE_INSTALL_PREFIX:PATH=${PREFIX_WIN} \
-DOGRE_DEPENDENCIES_DIR:PATH=${PREFIX_DEPS} \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DOGRE_DEPENDENCIES_DIR=${MINGW_PREFIX} \
-DOGRE_INSTALL_TOOLS=ON \
-DOGRE_COPY_DEPENDENCIES=OFF \
-DOGRE_INSTALL_DEPENDENCIES=OFF \
-DOGRE_BUILD_RENDERSYSTEM_D3D9=ON \
-DOGRE_BUILD_RENDERSYSTEM_D3D11=OFF \
-DCMAKE_BUILD_TYPE:STRING=${_buildtype} \
-DFREETYPE_FT2BUILD_INCLUDE_DIR=${PREFIX_DEPS}/include/freetype2 \
-DDirectX9_DXERR_LIBRARY=${PREFIX_DEPS}/${MINGW_CHOST}/lib/libdxerr9.a \
../${_realname}-${pkgver}
-DOGRE_BUILD_RENDERSYSTEM_D3D11=ON \
-DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON \
-DOGRE_BUILD_COMPONENT_VOLUME=ON \
-DOGRE_BUILD_COMPONENT_PAGING=ON \
-DOGRE_BUILD_COMPONENT_TERRAIN=ON \
-DOGRE_BUILD_COMPONENT_RTSHADERSYSTEM=ON \
-DOGRE_BUILD_COMPONENT_PROPERTY=ON \
-DOGRE_BUILD_COMPONENT_PYTHON=OFF \
-DOGRE_CONFIG_DOUBLE=OFF \
-DOGRE_BUILD_COMPONENT_JAVA=OFF \
-DOGRE_BUILD_SAMPLES=ON \
-DOGRE_INSTALL_SAMPLES=ON \
"${extra_config[@]}" \
../ogre-${pkgver}
make
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make -j1 install #DESTDIR="$pkgdir"
pushd ${pkgdir}${MINGW_PREFIX} > /dev/null
make -j1 DESTDIR=${pkgdir} install
mv bin/${_buildtype}/* bin/
rm -r bin/${_buildtype}
mv lib/${_buildtype}/* lib/
rm -r lib/${_buildtype}
sed -i "s|../../|../|g" \
bin/plugins.cfg \
bin/resources.cfg \
bin/quakemap.cfg
mkdir -p share/cmake-2.8/Modules
mv CMake/* share/cmake-2.8/Modules/
rm -r CMake
#rm -r media/CMakeFiles
#rm media/cmake_install.cmake
#rm media/Makefile
#rm -r Docs/CMakeFiles
#rm Docs/cmake_install.cmake
#rm Docs/Makefile
#rm Docs/CMakeLists.txt
popd > /dev/null
install -Dm0644 ${srcdir}/ogre-${pkgver}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE
mkdir -p ${pkgdir}${MINGW_PREFIX}/share/OGRE/Media/fonts
}

View File

@@ -1,39 +0,0 @@
--- ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9Plugin.cpp.orig 2013-12-21 21:15:12.649800000 +0400
+++ ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9Plugin.cpp 2013-12-21 21:16:24.767600000 +0400
@@ -33,7 +33,9 @@
extern "C" {
#include "WIN32/OgreMinGWSupport.h"
void _chkstk();
+#ifndef __MINGW64_VERSION_MAJOR
void _fastcall __security_check_cookie(intptr_t i);
+#endif
}
#endif
@@ -60,7 +62,9 @@
// in dynamic AND static builds
#ifdef __MINGW32__
_chkstk();
- __security_check_cookie((intptr_t)NULL);
+#ifndef __MINGW64_VERSION_MAJOR
+ __security_check_cookie((intptr_t)NULL);
+#endif
#endif
// Create the DirectX 9 rendering api
--- ogre3d-1.9.0/OgreMain/src/WIN32/OgreMinGWSupport.cpp.orig 2013-12-20 19:30:47.000000000 +0400
+++ ogre3d-1.9.0/OgreMain/src/WIN32/OgreMinGWSupport.cpp 2013-12-21 20:48:37.613800000 +0400
@@ -41,6 +41,7 @@
//_alloca();
}
+#ifndef __MINGW64_VERSION_MAJOR
// MSVC uses security cookies to prevent some buffer overflow attacks.
// provide dummy implementations.
intptr_t __security_cookie;
@@ -48,4 +49,5 @@
void _fastcall __security_check_cookie(intptr_t i)
{
}
+#endif
}

View File

@@ -1,12 +0,0 @@
--- ogre3d-1.9.0/CMakeLists.txt.orig 2013-12-10 14:50:35.000000000 +0400
+++ ogre3d-1.9.0/CMakeLists.txt 2013-12-11 00:03:24.029600000 +0400
@@ -145,9 +145,6 @@
endif ()
if (MINGW)
add_definitions(-D_WIN32_WINNT=0x0500)
- # set architecture to i686, since otherwise some versions of MinGW can't link
- # the atomic primitives
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
# Fpermissive required to let some "non-standard" casting operations in the plugins pass
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
# disable this optimisation because it breaks release builds (reason unknown)

View File

@@ -1,11 +0,0 @@
--- Samples/EndlessWorld/include/EndlessWorld.h.orig 2013-12-11 19:33:26.968200000 +0400
+++ Samples/EndlessWorld/include/EndlessWorld.h 2013-12-11 19:37:59.153600000 +0400
@@ -132,7 +132,7 @@
Real x = (pt.x / 2) + 0.5f;
Real y = 1 - ((pt.y / 2) + 0.5f);
- String lName = StringConverter::toString((unsigned long)(t))+"/"+"LodInfoLabel";
+ String lName = StringConverter::toString((size_t)(t))+"/"+"LodInfoLabel";
OverlayElement *l = OverlayManager::getSingleton().createOverlayElement("TextArea", lName);
l->setCaption("Target="+StringConverter::toString(t->getTargetLodLevel())+"\nHighest="+

View File

@@ -1,11 +0,0 @@
--- ogre3d-1.9.0/OgreMain/CMakeLists.txt.orig 2013-12-10 14:50:36.000000000 +0400
+++ ogre3d-1.9.0/OgreMain/CMakeLists.txt 2013-12-15 21:25:07.186200000 +0400
@@ -220,7 +220,7 @@
list(APPEND HEADER_FILES ${THREAD_HEADER_FILES})
# Add needed definitions and nedmalloc include dir
-add_definitions(-DOGRE_NONCLIENT_BUILD -DFREEIMAGE_LIB -D_MT -D_USRDLL)
+add_definitions(-DOGRE_NONCLIENT_BUILD -D_MT -D_USRDLL)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/nedmalloc)
set(LIBRARIES ${PLATFORM_LIBS})

View File

@@ -1,407 +0,0 @@
--- ogre3d-1.9.0/RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h.orig 2013-12-20 22:01:31.257800000 +0400
+++ ogre3d-1.9.0/RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h 2013-12-20 22:01:52.177400000 +0400
@@ -72,7 +72,7 @@
#endif
#include <d3d9.h>
#include <d3dx9.h>
-#include <DxErr.h>
+#include <DxErr9.h>
namespace Ogre
--- ogre3d-1.9.0/CMake/Packages/FindDirectX.cmake.orig 2013-12-20 22:02:56.585400000 +0400
+++ ogre3d-1.9.0/CMake/Packages/FindDirectX.cmake 2013-12-20 22:02:59.674200000 +0400
@@ -55,7 +55,7 @@
endif(CMAKE_CL_64)
find_library(DirectX9_LIBRARY NAMES d3d9 HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX})
find_library(DirectX9_D3DX9_LIBRARY NAMES d3dx9 HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX})
- find_library(DirectX9_DXERR_LIBRARY NAMES DxErr HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX})
+ find_library(DirectX9_DXERR_LIBRARY NAMES DxErr9 HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX})
find_library(DirectX9_DXGUID_LIBRARY NAMES dxguid HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX})
findpkg_finish(DirectX9)
--- ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9HardwareIndexBuffer.cpp.orig 2013-12-21 00:19:04.505600000 +0400
+++ ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9HardwareIndexBuffer.cpp 2013-12-21 00:19:43.776800000 +0400
@@ -294,7 +294,7 @@
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Cannot create D3D9 Index buffer: " + msg,
"D3D9HardwareIndexBuffer::createBuffer");
@@ -303,7 +303,7 @@
hr = bufferResources->mBuffer->GetDesc(&mBufferDesc);
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Cannot get D3D9 Index buffer desc: " + msg,
"D3D9HardwareIndexBuffer::createBuffer");
@@ -399,7 +399,7 @@
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Cannot lock D3D9 vertex buffer: " + msg,
"D3D9HardwareVertexBuffer::_lockBuffer");
@@ -417,7 +417,7 @@
hr = bufferResources->mBuffer->Unlock();
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Cannot unlock D3D9 vertex buffer: " + msg,
"D3D9HardwareVertexBuffer::_unlockBuffer");
--- ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9HardwareVertexBuffer.cpp.orig 2013-12-20 19:30:44.000000000 +0400
+++ ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9HardwareVertexBuffer.cpp 2013-12-21 00:20:32.651600000 +0400
@@ -290,7 +290,7 @@
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Cannot restore D3D9 vertex buffer: " + msg,
"D3D9HardwareVertexBuffer::createBuffer");
@@ -299,7 +299,7 @@
hr = bufferResources->mBuffer->GetDesc(&mBufferDesc);
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Cannot get D3D9 Vertex buffer desc: " + msg,
"D3D9HardwareVertexBuffer::createBuffer");
@@ -396,7 +396,7 @@
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Cannot lock D3D9 vertex buffer: " + msg,
"D3D9HardwareVertexBuffer::_lockBuffer");
@@ -414,7 +414,7 @@
hr = bufferResources->mBuffer->Unlock();
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Cannot unlock D3D9 vertex buffer: " + msg,
"D3D9HardwareVertexBuffer::_unlockBuffer");
--- ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9RenderSystem.cpp.orig 2013-12-20 19:30:44.000000000 +0400
+++ ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9RenderSystem.cpp 2013-12-21 20:02:33.748800000 +0400
@@ -1594,7 +1594,7 @@
//---------------------------------------------------------------------
String D3D9RenderSystem::getErrorDescription( long errorNumber ) const
{
- const String errMsg = DXGetErrorDescription( errorNumber );
+ const String errMsg = DXGetErrorDescription9( errorNumber );
return errMsg;
}
//---------------------------------------------------------------------
@@ -2923,7 +2923,7 @@
&depthBufferSurface, NULL);
if( FAILED(hr) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT( Exception::ERR_RENDERINGAPI_ERROR,
"Error CreateDepthStencilSurface : " + msg,
"D3D9RenderSystem::_createDepthBufferFor" );
@@ -3110,14 +3110,14 @@
hr = getActiveD3D9Device()->SetRenderTarget(x, pBack[x]);
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Failed to setRenderTarget : " + msg, "D3D9RenderSystem::_setViewport" );
}
}
hr = getActiveD3D9Device()->SetDepthStencilSurface( depthSurface );
if (FAILED(hr))
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Failed to setDepthStencil : " + msg, "D3D9RenderSystem::_setViewport" );
}
}
@@ -3182,7 +3182,7 @@
if( FAILED( hr = getActiveD3D9Device()->BeginScene() ) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error beginning frame :" + msg, "D3D9RenderSystem::_beginFrame" );
}
@@ -3532,7 +3532,7 @@
if( FAILED( hr ) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Failed to DrawPrimitive : " + msg, "D3D9RenderSystem::_render" );
}
@@ -3906,7 +3906,7 @@
depth,
stencil ) ) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error clearing frame buffer : "
+ msg, "D3D9RenderSystem::clearFrameBuffer" );
}
--- ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9Texture.cpp.orig 2013-12-20 19:30:44.000000000 +0400
+++ ogre3d-1.9.0/RenderSystems/Direct3D9/src/OgreD3D9Texture.cpp 2013-12-21 20:07:57.551800000 +0400
@@ -119,7 +119,7 @@
IDirect3DSurface9 *pSrcSurface = 0;
if( FAILED( hr = srcTextureResource->pNormTex->GetSurfaceLevel(0, &pSrcSurface) ) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" );
}
@@ -127,7 +127,7 @@
IDirect3DSurface9 *pDstSurface = 0;
if( FAILED( hr = dstTextureResource->pNormTex->GetSurfaceLevel(0, &pDstSurface) ) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
SAFE_RELEASE(pSrcSurface);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" );
}
@@ -135,7 +135,7 @@
// do the blit, it's called StretchRect in D3D9 :)
if( FAILED( hr = it->first->StretchRect( pSrcSurface, NULL, pDstSurface, &dstRC, D3DTEXF_NONE) ) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
SAFE_RELEASE(pSrcSurface);
SAFE_RELEASE(pDstSurface);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" );
@@ -156,7 +156,7 @@
IDirect3DSurface9 *pSrcSurface = 0;
if( FAILED( hr =srcTextureResource->pCubeTex->GetCubeMapSurface((D3DCUBEMAP_FACES)face, 0, &pSrcSurface) ) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" );
}
@@ -164,7 +164,7 @@
IDirect3DSurface9 *pDstSurface = 0;
if( FAILED( hr = dstTextureResource->pCubeTex->GetCubeMapSurface((D3DCUBEMAP_FACES)face, 0, &pDstSurface) ) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
SAFE_RELEASE(pSrcSurface);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" );
}
@@ -172,7 +172,7 @@
// do the blit, it's called StretchRect in D3D9 :)
if( FAILED( hr = it->first->StretchRect( pSrcSurface, NULL, pDstSurface, &dstRC, D3DTEXF_NONE) ) )
{
- String msg = DXGetErrorDescription(hr);
+ String msg = DXGetErrorDescription9(hr);
SAFE_RELEASE(pSrcSurface);
SAFE_RELEASE(pDstSurface);
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Couldn't blit : " + msg, "D3D9Texture::copyToTexture" );
@@ -564,7 +564,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't create cube texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't create cube texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_loadCubeTex" );
}
@@ -573,7 +573,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_loadCubeTex" );
}
@@ -698,7 +698,7 @@
if (FAILED(hr))
{
OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
- "Unable to load volume texture from " + getName() + ": " + String(DXGetErrorDescription(hr)),
+ "Unable to load volume texture from " + getName() + ": " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_loadVolumeTex");
}
@@ -707,7 +707,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_loadVolumeTex" );
}
@@ -860,7 +860,7 @@
if (FAILED(hr))
{
OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
- "Unable to load texture from " + getName() + " :" + String(DXGetErrorDescription(hr)),
+ "Unable to load texture from " + getName() + " :" + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_loadNormTex");
}
@@ -869,7 +869,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_loadNormTex" );
}
@@ -1107,7 +1107,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createNormTex" );
}
@@ -1116,7 +1116,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createNormTex" );
}
@@ -1127,7 +1127,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createNormTex" );
}
@@ -1143,7 +1143,7 @@
if (FAILED(hr))
{
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
- "Unable to create AA render target: " + String(DXGetErrorDescription(hr)),
+ "Unable to create AA render target: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createNormTex");
}
@@ -1158,7 +1158,7 @@
hr = textureResources->pBaseTex->SetAutoGenFilterType(_getBestFilterMethod(d3d9Device));
if(FAILED(hr))
{
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createNormTex" );
}
}
@@ -1264,7 +1264,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createCubeTex" );
}
@@ -1273,7 +1273,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createCubeTex" );
}
@@ -1284,7 +1284,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createCubeTex" );
}
@@ -1300,7 +1300,7 @@
if (FAILED(hr))
{
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
- "Unable to create AA render target: " + String(DXGetErrorDescription(hr)),
+ "Unable to create AA render target: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createCubeTex");
}
}
@@ -1314,7 +1314,7 @@
hr = textureResources->pBaseTex->SetAutoGenFilterType(_getBestFilterMethod(d3d9Device));
if(FAILED(hr))
{
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createCubeTex" );
}
}
@@ -1416,7 +1416,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error creating texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createVolumeTex" );
}
@@ -1425,7 +1425,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get base texture: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createVolumeTex" );
}
@@ -1436,7 +1436,7 @@
if (FAILED(hr))
{
freeInternalResources();
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get texture description: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createVolumeTex" );
}
_setFinalAttributes(d3d9Device, textureResources,
@@ -1448,7 +1448,7 @@
hr = textureResources->pBaseTex->SetAutoGenFilterType(_getBestFilterMethod(d3d9Device));
if(FAILED(hr))
{
- OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription(hr)),
+ OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not set best autogen filter type: " + String(DXGetErrorDescription9(hr)),
"D3D9Texture::_createCubeTex" );
}
}
@@ -2104,7 +2104,7 @@
if (FAILED(hr))
{
OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
- "Unable to copy AA buffer to final buffer: " + String(DXGetErrorDescription(hr)),
+ "Unable to copy AA buffer to final buffer: " + String(DXGetErrorDescription9(hr)),
"D3D9RenderTexture::swapBuffers");
}
}