From 39ee9e9ab867729a41380f318f1ff7696a253884 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 2 Apr 2012 17:51:51 +0200 Subject: [PATCH 1/2] setting for field of view --- apps/openmw/mwrender/renderingmanager.cpp | 2 +- files/settings-default.cfg | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 7f4b1ec39..7d30fab6e 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -23,7 +23,7 @@ namespace MWRender { RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const boost::filesystem::path& resDir, OEngine::Physic::PhysicEngine* engine, MWWorld::Environment& environment) :mRendering(_rend), mObjects(mRendering), mActors(mRendering, environment), mAmbientMode(0) { - mRendering.createScene("PlayerCam", 55, 5); + mRendering.createScene("PlayerCam", Settings::Manager::getFloat("fieldofview", "General"), 5); mTerrainManager = new TerrainManager(mRendering.getScene(), environment); diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 6372a31c1..86dddc908 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -1,5 +1,8 @@ -[HUD] +[General] +# Camera field of view +fieldofview = 55 +[HUD] # FPS counter # 0: not visible # 1: basic FPS display @@ -7,7 +10,6 @@ fps = 0 [Objects] - shaders = true # Max. number of lights that affect objects. Setting to 1 will only reflect sunlight @@ -18,7 +20,6 @@ num lights = 8 use static geometry = true [Viewing distance] - # Limit the rendering distance of small objects limit small object distance = false @@ -38,6 +39,5 @@ fog start factor = 0.5 fog end factor = 1.0 [Terrain] - # Max. number of lights that affect the terrain. Setting to 1 will only reflect sunlight num lights = 8 From ff15f28787bdb71e9abe53a96758ff23ed80d524 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 2 Apr 2012 18:01:49 +0200 Subject: [PATCH 2/2] options for texture filtering and mipmaps --- apps/openmw/mwrender/renderingmanager.cpp | 14 ++++++++++++-- files/settings-default.cfg | 14 +++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 7d30fab6e..4b54f3ea2 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -23,7 +23,7 @@ namespace MWRender { RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const boost::filesystem::path& resDir, OEngine::Physic::PhysicEngine* engine, MWWorld::Environment& environment) :mRendering(_rend), mObjects(mRendering), mActors(mRendering, environment), mAmbientMode(0) { - mRendering.createScene("PlayerCam", Settings::Manager::getFloat("fieldofview", "General"), 5); + mRendering.createScene("PlayerCam", Settings::Manager::getFloat("field of view", "General"), 5); mTerrainManager = new TerrainManager(mRendering.getScene(), environment); @@ -32,7 +32,17 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const configureFog(1, ColourValue(1,1,1)); // Set default mipmap level (NB some APIs ignore this) - TextureManager::getSingleton().setDefaultNumMipmaps(5); + TextureManager::getSingleton().setDefaultNumMipmaps(Settings::Manager::getInt("num mipmaps", "General")); + + // Set default texture filtering options + TextureFilterOptions tfo; + std::string filter = Settings::Manager::getString("texture filtering", "General"); + if (filter == "anisotropic") tfo = TFO_ANISOTROPIC; + else if (filter == "trilinear") tfo = TFO_TRILINEAR; + else /* if (filter == "bilinear") */ tfo = TFO_BILINEAR; + + MaterialManager::getSingleton().setDefaultTextureFiltering(tfo); + MaterialManager::getSingleton().setDefaultAnisotropy(Settings::Manager::getInt("anisotropy", "General")); // Load resources ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 86dddc908..f616471cc 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -1,6 +1,18 @@ [General] # Camera field of view -fieldofview = 55 +field of view = 55 + +# Texture filtering mode. valid values: +# anisotropic +# bilinear +# trilinear +texture filtering = anisotropic + +# Has no effect when texture filtering is not anisotropic +anisotropy = 4 + +# Number of texture mipmaps to generate +num mipmaps = 5 [HUD] # FPS counter