|
From: <xs...@us...> - 2006-05-18 19:02:39
|
Revision: 28 Author: xsdwx Date: 2006-05-18 12:02:34 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=28&view=rev Log Message: ----------- Removed Paths: ------------- trunk/perceptioncrash/src/Graphics.cpp trunk/perceptioncrash/src/Graphics.hpp Deleted: trunk/perceptioncrash/src/Graphics.cpp =================================================================== --- trunk/perceptioncrash/src/Graphics.cpp 2006-05-18 18:59:36 UTC (rev 27) +++ trunk/perceptioncrash/src/Graphics.cpp 2006-05-18 19:02:34 UTC (rev 28) @@ -1,37 +0,0 @@ -#include "Graphics.hpp" - -graphics::graphics() - : mRoot(new Ogre::Root("plugins.cfg", "ogre.cfg", "ogre.log")), - mSmgr(mRoot->createSceneManager("BspSceneManager")) -{ - // HACK This is setting either OpenGL or first thing it comes to - Ogre::RenderSystemList* renderers = mRoot->getAvailableRenderers(); - Ogre::RenderSystem* r = *renderers->begin(); // default - - for (Ogre::RenderSystemList::iterator i = renderers->begin(); - i != renderers->end(); ++i) - { - if (Ogre::StringUtil::match((*i)->getName(), "*opengl*", false)) - r = *i; - } - - r->setConfigOption("FSAA", "0"); - r->setConfigOption("Full Screen", "no"); - r->setConfigOption("RTT Preferred Mode", "FBO"); - r->setConfigOption("Video Mode", "800 x 600"); - - mRoot->setRenderSystem(r); - mWindow = mRoot->initialise(true, "Application"); - - // Should probably change this stuff - mCamera = mSmgr->createCamera("camera"); - mCamera->setPosition(Ogre::Vector3(0.0f, 0.0f, 500.0f)); - mCamera->lookAt(Ogre::Vector3(0.0f, 0.0f, 0.0f)); - mCamera->setNearClipDistance(5.0f); - mCamera->setFarClipDistance(5000.0f); - - mViewport = mWindow->addViewport(mCamera); - mViewport->setBackgroundColour(Ogre::ColourValue(0.3f, 0.3f, 0.3f)); - - mCamera->setAspectRatio(Ogre::Real(mViewport->getActualWidth()) / Ogre::Real(mViewport->getActualHeight())); -} Deleted: trunk/perceptioncrash/src/Graphics.hpp =================================================================== --- trunk/perceptioncrash/src/Graphics.hpp 2006-05-18 18:59:36 UTC (rev 27) +++ trunk/perceptioncrash/src/Graphics.hpp 2006-05-18 19:02:34 UTC (rev 28) @@ -1,42 +0,0 @@ -#ifndef PC_GRAPHICS_HPP -#define PC_GRAPHICS_HPP - -#include <memory> - -#include <Ogre.h> -#include <OgreEventListeners.h> -#include <OgreKeyEvent.h> - -#include "Singleton.hpp" - -class graphics -{ - public: - graphics(); - - void update() - { mRoot->_updateAllRenderTargets(); } - - Ogre::Root* getRootPtr() const - { return mRoot.get(); } - Ogre::RenderWindow* getWindowPtr() const - { return mWindow; } - Ogre::SceneManager* getSceneManagerPtr() const - { return mSmgr; } - Ogre::Camera* getCameraPtr() const - { return mCamera; } - Ogre::Viewport* getViewportPtr() const - { return mViewport; } - - private: - std::auto_ptr<Ogre::Root> mRoot; - - Ogre::RenderWindow* mWindow; - Ogre::SceneManager* mSmgr; - Ogre::Camera* mCamera; - Ogre::Viewport* mViewport; -}; - -typedef Singleton<graphics> Graphics; - -#endif /* PC_GRAPHICS_HPP*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |