From 700a0099c3737f9cb1c976459a6cfa2073667908 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 28 Oct 2015 16:13:40 +0100 Subject: [PATCH] Remove debug code --- apps/openmw/mwrender/npcanimation.cpp | 4 +-- apps/openmw/mwrender/renderingmanager.cpp | 33 ----------------------- apps/openmw/mwrender/sky.cpp | 5 +--- apps/openmw/mwrender/water.cpp | 2 -- apps/openmw/mwrender/water.hpp | 3 --- 5 files changed, 3 insertions(+), 44 deletions(-) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 17f0ce73c..0b3838a33 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -324,9 +324,9 @@ public: virtual void drawImplementation(osgUtil::RenderBin* bin, osg::RenderInfo& renderInfo, osgUtil::RenderLeaf*& previous) { - //renderInfo.getState()->applyAttribute(mDepth); + renderInfo.getState()->applyAttribute(mDepth); - //glClear(GL_DEPTH_BUFFER_BIT); + glClear(GL_DEPTH_BUFFER_BIT); bin->drawImplementation(renderInfo, previous); } diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 2aaba3035..b9132dc8c 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -198,39 +198,6 @@ namespace MWRender mFieldOfView = Settings::Manager::getFloat("field of view", "General"); updateProjectionMatrix(); mStateUpdater->setFogEnd(mViewDistance); - - /* - osg::Texture2D* texture = new osg::Texture2D; - texture->setSourceFormat(GL_DEPTH_COMPONENT); - texture->setInternalFormat(GL_DEPTH_COMPONENT24_ARB); - texture->setSourceType(GL_UNSIGNED_INT); - - mViewer->getCamera()->attach(osg::Camera::DEPTH_BUFFER, texture); - - osg::ref_ptr camera (new osg::Camera); - camera->setProjectionMatrix(osg::Matrix::identity()); - camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); - camera->setViewMatrix(osg::Matrix::identity()); - camera->setClearMask(0); - camera->setRenderOrder(osg::Camera::NESTED_RENDER); - camera->setAllowEventFocus(false); - - osg::ref_ptr geode (new osg::Geode); - osg::ref_ptr geom = osg::createTexturedQuadGeometry(osg::Vec3f(-1,-1,0), osg::Vec3f(0.5,0,0), osg::Vec3f(0,0.5,0)); - geode->addDrawable(geom); - - camera->addChild(geode); - - osg::StateSet* stateset = geom->getOrCreateStateSet(); - - stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); - stateset->setMode(GL_LIGHTING, osg::StateAttribute::OFF); - - stateset->setRenderBinDetails(20, "RenderBin"); - stateset->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); - - mLightRoot->addChild(camera); - */ } RenderingManager::~RenderingManager() diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index 30dc08989..5938fb13c 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -1,9 +1,6 @@ #include "sky.hpp" #include -#include - -#include #include #include @@ -264,7 +261,7 @@ public: META_Node(MWRender, CameraRelativeTransform) - virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv) const + virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix, osg::NodeVisitor*) const { if (_referenceFrame==RELATIVE_RF) { diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index cf361a504..b2354924a 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -2,8 +2,6 @@ #include -#include - #include #include #include diff --git a/apps/openmw/mwrender/water.hpp b/apps/openmw/mwrender/water.hpp index 78e8a4927..a75464612 100644 --- a/apps/openmw/mwrender/water.hpp +++ b/apps/openmw/mwrender/water.hpp @@ -9,9 +9,6 @@ namespace osg { class Group; class PositionAttitudeTransform; - class Texture2D; - class Image; - class Camera; } namespace osgUtil