mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-01 06:17:58 +03:00
Merge remote branch 'scrawl/next' into next
This commit is contained in:
commit
420e611a4b
4 changed files with 210 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "renderer.hpp"
|
||||
#include "fader.hpp"
|
||||
|
||||
#include "OgreRoot.h"
|
||||
#include "OgreRenderWindow.h"
|
||||
|
@ -12,6 +13,8 @@ using namespace OEngine::Render;
|
|||
|
||||
void OgreRenderer::cleanup()
|
||||
{
|
||||
delete mFader;
|
||||
|
||||
if(mRoot)
|
||||
delete mRoot;
|
||||
mRoot = NULL;
|
||||
|
@ -22,6 +25,11 @@ void OgreRenderer::start()
|
|||
mRoot->startRendering();
|
||||
}
|
||||
|
||||
void OgreRenderer::update(float dt)
|
||||
{
|
||||
mFader->update(dt);
|
||||
}
|
||||
|
||||
void OgreRenderer::screenshot(const std::string &file)
|
||||
{
|
||||
mWindow->writeContentsToFile(file);
|
||||
|
@ -104,4 +112,6 @@ void OgreRenderer::createScene(const std::string camName, float fov, float nearC
|
|||
|
||||
// Alter the camera aspect ratio to match the viewport
|
||||
mCamera->setAspectRatio(Real(mView->getActualWidth()) / Real(mView->getActualHeight()));
|
||||
|
||||
mFader = new Fader();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue