mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:23:51 +00:00
commit
eec82f676a
9 changed files with 17 additions and 21 deletions
|
@ -241,7 +241,7 @@ namespace MWGui
|
||||||
MyGUI::FactoryManager::getInstance().registerFactory<ResourceImageSetPointerFix>("Resource", "ResourceImageSetPointer");
|
MyGUI::FactoryManager::getInstance().registerFactory<ResourceImageSetPointerFix>("Resource", "ResourceImageSetPointer");
|
||||||
MyGUI::FactoryManager::getInstance().registerFactory<AutoSizedResourceSkin>("Resource", "AutoSizedResourceSkin");
|
MyGUI::FactoryManager::getInstance().registerFactory<AutoSizedResourceSkin>("Resource", "AutoSizedResourceSkin");
|
||||||
MyGUI::ResourceManager::getInstance().load("core.xml");
|
MyGUI::ResourceManager::getInstance().load("core.xml");
|
||||||
loadUserFonts();
|
WindowManager::loadUserFonts();
|
||||||
|
|
||||||
bool keyboardNav = Settings::Manager::getBool("keyboard navigation", "GUI");
|
bool keyboardNav = Settings::Manager::getBool("keyboard navigation", "GUI");
|
||||||
mKeyboardNavigation.reset(new KeyboardNavigation());
|
mKeyboardNavigation.reset(new KeyboardNavigation());
|
||||||
|
|
|
@ -515,13 +515,11 @@ namespace MWRender
|
||||||
protected:
|
protected:
|
||||||
virtual void setDefaults(osg::StateSet* stateset)
|
virtual void setDefaults(osg::StateSet* stateset)
|
||||||
{
|
{
|
||||||
osg::Material* material = static_cast<osg::Material*>(stateset->getAttribute(osg::StateAttribute::MATERIAL));
|
|
||||||
|
|
||||||
osg::BlendFunc* blendfunc (new osg::BlendFunc);
|
osg::BlendFunc* blendfunc (new osg::BlendFunc);
|
||||||
stateset->setAttributeAndModes(blendfunc, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
|
stateset->setAttributeAndModes(blendfunc, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
|
||||||
|
|
||||||
// FIXME: overriding diffuse/ambient/emissive colors
|
// FIXME: overriding diffuse/ambient/emissive colors
|
||||||
material = new osg::Material;
|
osg::Material* material = new osg::Material;
|
||||||
material->setColorMode(osg::Material::OFF);
|
material->setColorMode(osg::Material::OFF);
|
||||||
material->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,mAlpha));
|
material->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,mAlpha));
|
||||||
material->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,1));
|
material->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,1));
|
||||||
|
@ -635,7 +633,7 @@ namespace MWRender
|
||||||
|
|
||||||
Animation::~Animation()
|
Animation::~Animation()
|
||||||
{
|
{
|
||||||
setLightEffect(0.f);
|
Animation::setLightEffect(0.f);
|
||||||
|
|
||||||
if (mObjectRoot)
|
if (mObjectRoot)
|
||||||
mInsert->removeChild(mObjectRoot);
|
mInsert->removeChild(mObjectRoot);
|
||||||
|
|
|
@ -1489,7 +1489,7 @@ OpenAL_Output::OpenAL_Output(SoundManager &mgr)
|
||||||
|
|
||||||
OpenAL_Output::~OpenAL_Output()
|
OpenAL_Output::~OpenAL_Output()
|
||||||
{
|
{
|
||||||
deinit();
|
OpenAL_Output::deinit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1362,7 +1362,7 @@ namespace MWSound
|
||||||
|
|
||||||
void SoundManager::clear()
|
void SoundManager::clear()
|
||||||
{
|
{
|
||||||
stopMusic();
|
SoundManager::stopMusic();
|
||||||
|
|
||||||
for(SoundMap::value_type &snd : mActiveSounds)
|
for(SoundMap::value_type &snd : mActiveSounds)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@ ParticleSystem::ParticleSystem(const ParticleSystem ©, const osg::CopyOp &co
|
||||||
{
|
{
|
||||||
// For some reason the osgParticle constructor doesn't copy the particles
|
// For some reason the osgParticle constructor doesn't copy the particles
|
||||||
for (int i=0;i<copy.numParticles()-copy.numDeadParticles();++i)
|
for (int i=0;i<copy.numParticles()-copy.numDeadParticles();++i)
|
||||||
createParticle(copy.getParticle(i));
|
ParticleSystem::createParticle(copy.getParticle(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParticleSystem::setQuota(int quota)
|
void ParticleSystem::setQuota(int quota)
|
||||||
|
|
|
@ -261,18 +261,18 @@ namespace SceneUtil {
|
||||||
|
|
||||||
float _shadowFadeStart = 0.0;
|
float _shadowFadeStart = 0.0;
|
||||||
|
|
||||||
class DebugHUD : public osg::Referenced
|
class DebugHUD final : public osg::Referenced
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DebugHUD(int numberOfShadowMapsPerLight);
|
DebugHUD(int numberOfShadowMapsPerLight);
|
||||||
|
|
||||||
virtual void draw(osg::ref_ptr<osg::Texture2D> texture, unsigned int shadowMapNumber, const osg::Matrixd &matrix, osgUtil::CullVisitor& cv);
|
void draw(osg::ref_ptr<osg::Texture2D> texture, unsigned int shadowMapNumber, const osg::Matrixd &matrix, osgUtil::CullVisitor& cv);
|
||||||
|
|
||||||
virtual void releaseGLObjects(osg::State* state = 0) const;
|
void releaseGLObjects(osg::State* state = 0) const;
|
||||||
|
|
||||||
virtual void setFrustumVertices(osg::ref_ptr<osg::Vec3Array> vertices, unsigned int traversalNumber);
|
void setFrustumVertices(osg::ref_ptr<osg::Vec3Array> vertices, unsigned int traversalNumber);
|
||||||
protected:
|
protected:
|
||||||
virtual void addAnotherShadowMap();
|
void addAnotherShadowMap();
|
||||||
|
|
||||||
static const int sDebugTextureUnit = 0;
|
static const int sDebugTextureUnit = 0;
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,13 @@ namespace SceneUtil
|
||||||
|
|
||||||
ShadowManager(osg::ref_ptr<osg::Group> sceneRoot, osg::ref_ptr<osg::Group> rootNode, unsigned int outdoorShadowCastingMask, unsigned int indoorShadowCastingMask, Shader::ShaderManager &shaderManager);
|
ShadowManager(osg::ref_ptr<osg::Group> sceneRoot, osg::ref_ptr<osg::Group> rootNode, unsigned int outdoorShadowCastingMask, unsigned int indoorShadowCastingMask, Shader::ShaderManager &shaderManager);
|
||||||
|
|
||||||
virtual ~ShadowManager() = default;
|
void setupShadowSettings();
|
||||||
|
|
||||||
virtual void setupShadowSettings();
|
Shader::ShaderManager::DefineMap getShadowDefines();
|
||||||
|
|
||||||
virtual Shader::ShaderManager::DefineMap getShadowDefines();
|
void enableIndoorMode();
|
||||||
|
|
||||||
virtual void enableIndoorMode();
|
void enableOutdoorMode();
|
||||||
|
|
||||||
virtual void enableOutdoorMode();
|
|
||||||
protected:
|
protected:
|
||||||
bool mEnableShadows;
|
bool mEnableShadows;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ GraphicsWindowSDL2::GraphicsWindowSDL2(osg::GraphicsContext::Traits *traits)
|
||||||
_traits = traits;
|
_traits = traits;
|
||||||
|
|
||||||
init();
|
init();
|
||||||
if(valid())
|
if(GraphicsWindowSDL2::valid())
|
||||||
{
|
{
|
||||||
setState(new osg::State);
|
setState(new osg::State);
|
||||||
getState()->setGraphicsContext(this);
|
getState()->setGraphicsContext(this);
|
||||||
|
|
|
@ -28,7 +28,7 @@ TerrainGrid::~TerrainGrid()
|
||||||
{
|
{
|
||||||
while (!mGrid.empty())
|
while (!mGrid.empty())
|
||||||
{
|
{
|
||||||
unloadCell(mGrid.begin()->first.first, mGrid.begin()->first.second);
|
TerrainGrid::unloadCell(mGrid.begin()->first.first, mGrid.begin()->first.second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue