mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
build fix for windows
This commit is contained in:
parent
b1fac1b00a
commit
d37d0b1947
2 changed files with 9 additions and 7 deletions
|
@ -86,15 +86,15 @@ namespace MWRender
|
||||||
normalMap->setProperty ("direct_texture", sh::makeProperty<sh::StringValue> (new sh::StringValue(terrain->getTerrainNormalMap ()->getName())));
|
normalMap->setProperty ("direct_texture", sh::makeProperty<sh::StringValue> (new sh::StringValue(terrain->getTerrainNormalMap ()->getName())));
|
||||||
normalMap->setProperty ("tex_address_mode", sh::makeProperty<sh::StringValue> (new sh::StringValue("clamp")));
|
normalMap->setProperty ("tex_address_mode", sh::makeProperty<sh::StringValue> (new sh::StringValue("clamp")));
|
||||||
|
|
||||||
uint maxLayers = getMaxLayers(terrain);
|
Ogre::uint maxLayers = getMaxLayers(terrain);
|
||||||
uint numBlendTextures = std::min(terrain->getBlendTextureCount(maxLayers), terrain->getBlendTextureCount());
|
Ogre::uint numBlendTextures = std::min(terrain->getBlendTextureCount(maxLayers), terrain->getBlendTextureCount());
|
||||||
uint numLayers = std::min(maxLayers, static_cast<uint>(terrain->getLayerCount()));
|
Ogre::uint numLayers = std::min(maxLayers, static_cast<Ogre::uint>(terrain->getLayerCount()));
|
||||||
|
|
||||||
p->mShaderProperties.setProperty ("num_layers", sh::makeProperty<sh::StringValue>(new sh::StringValue(Ogre::StringConverter::toString(numLayers))));
|
p->mShaderProperties.setProperty ("num_layers", sh::makeProperty<sh::StringValue>(new sh::StringValue(Ogre::StringConverter::toString(numLayers))));
|
||||||
p->mShaderProperties.setProperty ("num_blendmaps", sh::makeProperty<sh::StringValue>(new sh::StringValue(Ogre::StringConverter::toString(numBlendTextures))));
|
p->mShaderProperties.setProperty ("num_blendmaps", sh::makeProperty<sh::StringValue>(new sh::StringValue(Ogre::StringConverter::toString(numBlendTextures))));
|
||||||
|
|
||||||
// blend maps
|
// blend maps
|
||||||
for (uint i = 0; i < numBlendTextures; ++i)
|
for (Ogre::uint i = 0; i < numBlendTextures; ++i)
|
||||||
{
|
{
|
||||||
sh::MaterialInstanceTextureUnit* blendTex = p->createTextureUnit ("blendMap" + Ogre::StringConverter::toString(i));
|
sh::MaterialInstanceTextureUnit* blendTex = p->createTextureUnit ("blendMap" + Ogre::StringConverter::toString(i));
|
||||||
blendTex->setProperty ("direct_texture", sh::makeProperty<sh::StringValue> (new sh::StringValue(terrain->getBlendTextureName(i))));
|
blendTex->setProperty ("direct_texture", sh::makeProperty<sh::StringValue> (new sh::StringValue(terrain->getBlendTextureName(i))));
|
||||||
|
@ -102,7 +102,7 @@ namespace MWRender
|
||||||
}
|
}
|
||||||
|
|
||||||
// layer maps
|
// layer maps
|
||||||
for (uint i = 0; i < numLayers; ++i)
|
for (Ogre::uint i = 0; i < numLayers; ++i)
|
||||||
{
|
{
|
||||||
sh::MaterialInstanceTextureUnit* diffuseTex = p->createTextureUnit ("diffuseMap" + Ogre::StringConverter::toString(i));
|
sh::MaterialInstanceTextureUnit* diffuseTex = p->createTextureUnit ("diffuseMap" + Ogre::StringConverter::toString(i));
|
||||||
diffuseTex->setProperty ("direct_texture", sh::makeProperty<sh::StringValue> (new sh::StringValue(terrain->getLayerTextureName(i, 0))));
|
diffuseTex->setProperty ("direct_texture", sh::makeProperty<sh::StringValue> (new sh::StringValue(terrain->getLayerTextureName(i, 0))));
|
||||||
|
@ -111,7 +111,7 @@ namespace MWRender
|
||||||
}
|
}
|
||||||
|
|
||||||
// shadow
|
// shadow
|
||||||
for (uint i = 0; i < 3; ++i)
|
for (Ogre::uint i = 0; i < 3; ++i)
|
||||||
{
|
{
|
||||||
sh::MaterialInstanceTextureUnit* shadowTex = p->createTextureUnit ("shadowMap" + Ogre::StringConverter::toString(i));
|
sh::MaterialInstanceTextureUnit* shadowTex = p->createTextureUnit ("shadowMap" + Ogre::StringConverter::toString(i));
|
||||||
shadowTex->setProperty ("content_type", sh::makeProperty<sh::StringValue> (new sh::StringValue("shadow")));
|
shadowTex->setProperty ("content_type", sh::makeProperty<sh::StringValue> (new sh::StringValue("shadow")));
|
||||||
|
|
|
@ -110,7 +110,9 @@ void OgreRenderer::configure(const std::string &logPath,
|
||||||
pluginDir = OGRE_PLUGIN_DIR_REL;
|
pluginDir = OGRE_PLUGIN_DIR_REL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifndef OGRE_PLUGIN_DEBUG_SUFFIX
|
||||||
|
#define OGRE_PLUGIN_DEBUG_SUFFIX ""
|
||||||
|
#endif
|
||||||
std::string glPlugin = std::string(pluginDir) + "/RenderSystem_GL" + OGRE_PLUGIN_DEBUG_SUFFIX;
|
std::string glPlugin = std::string(pluginDir) + "/RenderSystem_GL" + OGRE_PLUGIN_DEBUG_SUFFIX;
|
||||||
if (boost::filesystem::exists(glPlugin + ".so") || boost::filesystem::exists(glPlugin + ".dll"))
|
if (boost::filesystem::exists(glPlugin + ".so") || boost::filesystem::exists(glPlugin + ".dll"))
|
||||||
mRoot->loadPlugin (glPlugin);
|
mRoot->loadPlugin (glPlugin);
|
||||||
|
|
Loading…
Reference in a new issue