From c626cf66f977b1ad2ef199633afa19dcacc4471d Mon Sep 17 00:00:00 2001 From: wraitii Date: Sat, 28 Jun 2014 08:54:59 +0000 Subject: [PATCH] Fix build-osx-libs properly for mavericks after learning some Bash. Fix a long-standing typo in TerrainRenderer for water rendering that apparently had no effect. Don't compress the water textures to make it look better. They will be changed anyhow. This was SVN commit r15461. --- .../mods/public/art/textures/animated/water/textures.xml | 2 +- libraries/osx/build-osx-libs.sh | 6 +----- source/renderer/TerrainRenderer.cpp | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/binaries/data/mods/public/art/textures/animated/water/textures.xml b/binaries/data/mods/public/art/textures/animated/water/textures.xml index 894728518c..ac9a62697c 100644 --- a/binaries/data/mods/public/art/textures/animated/water/textures.xml +++ b/binaries/data/mods/public/art/textures/animated/water/textures.xml @@ -1,4 +1,4 @@ - + diff --git a/libraries/osx/build-osx-libs.sh b/libraries/osx/build-osx-libs.sh index 1855e2df07..35022716e5 100755 --- a/libraries/osx/build-osx-libs.sh +++ b/libraries/osx/build-osx-libs.sh @@ -66,6 +66,7 @@ ARCH=${ARCH:="x86_64"} # On newer OS X versions, this will be a symbolic link to LLVM GCC # TODO: don't rely on that export CC=${CC:="clang"} CXX=${CXX:="clang++"} +export MIN_OSX_VERSION=${MIN_OSX_VERSION:="10.9"} # The various libs offer inconsistent configure options, some allow # setting sysroot and OS X-specific options, others don't. Adding to @@ -85,11 +86,6 @@ if [[ $MIN_OSX_VERSION && ${MIN_OSX_VERSION-_} ]]; then # clang and llvm-gcc look at mmacosx-version-min to determine link target # and CRT version, and use it to set the macosx_version_min linker flag LDFLAGS="$LDFLAGS -mmacosx-version-min=$MIN_OSX_VERSION" -else - C_FLAGS="$C_FLAGS -mmacosx-version-min=10.9" - # clang and llvm-gcc look at mmacosx-version-min to determine link target - # and CRT version, and use it to set the macosx_version_min linker flag - LDFLAGS="$LDFLAGS -mmacosx-version-min=10.9" fi C_FLAGS="$C_FLAGS -arch $ARCH -fvisibility=hidden" LDFLAGS="$LDFLAGS -arch $ARCH" diff --git a/source/renderer/TerrainRenderer.cpp b/source/renderer/TerrainRenderer.cpp index d483e20d0b..26eb8abb36 100644 --- a/source/renderer/TerrainRenderer.cpp +++ b/source/renderer/TerrainRenderer.cpp @@ -766,7 +766,7 @@ bool TerrainRenderer::RenderFancyWater(const CShaderDefines& context, int cullGr m->wavesShader->BindTexture(str_waveTex, WaterMgr->m_Wave); m->wavesShader->Uniform(str_time, (float)time); m->wavesShader->Uniform(str_waviness, WaterMgr->m_Waviness); - m->wavesShader->Uniform(str_mapSize, (float)(WaterMgr->m_TexSize)); + m->wavesShader->Uniform(str_mapSize, (float)(WaterMgr->m_MapSize)); SWavesVertex *base=(SWavesVertex *)WaterMgr->m_VBWaves->m_Owner->Bind(); GLsizei stride = sizeof(SWavesVertex); @@ -805,7 +805,7 @@ bool TerrainRenderer::RenderFancyWater(const CShaderDefines& context, int cullGr if (WaterMgr->m_WaterFoam || WaterMgr->m_WaterCoastalWaves) { m->fancyWaterShader->BindTexture(str_Foam, WaterMgr->m_Foam); - m->fancyWaterShader->Uniform(str_mapSize, (float)(WaterMgr->m_TexSize)); + m->fancyWaterShader->Uniform(str_mapSize, (float)(WaterMgr->m_MapSize)); } if (WaterMgr->m_WaterRealDepth) m->fancyWaterShader->BindTexture(str_depthTex, WaterMgr->m_depthTT);