2012-04-23 10:57:16 +02:00
|
|
|
#include "environment.hpp"
|
|
|
|
|
|
|
|
#include <cassert>
|
2017-08-30 21:26:30 +00:00
|
|
|
|
2020-12-29 21:45:59 +01:00
|
|
|
#include <components/resource/resourcesystem.hpp>
|
|
|
|
|
2012-07-03 12:30:50 +02:00
|
|
|
#include "world.hpp"
|
2012-08-11 17:30:55 +02:00
|
|
|
#include "mechanicsmanager.hpp"
|
2012-07-03 12:30:50 +02:00
|
|
|
|
2020-11-13 11:39:47 +04:00
|
|
|
MWBase::Environment *MWBase::Environment::sThis = nullptr;
|
2012-04-23 10:57:16 +02:00
|
|
|
|
|
|
|
MWBase::Environment::Environment()
|
|
|
|
{
|
2022-05-06 17:46:50 +02:00
|
|
|
assert(sThis == nullptr);
|
2012-04-23 10:57:16 +02:00
|
|
|
sThis = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
MWBase::Environment::~Environment()
|
|
|
|
{
|
2020-11-13 11:39:47 +04:00
|
|
|
sThis = nullptr;
|
2012-04-23 10:57:16 +02:00
|
|
|
}
|
|
|
|
|
2020-05-22 00:11:23 +02:00
|
|
|
void MWBase::Environment::reportStats(unsigned int frameNumber, osg::Stats& stats) const
|
|
|
|
{
|
|
|
|
mMechanicsManager->reportStats(frameNumber, stats);
|
|
|
|
mWorld->reportStats(frameNumber, stats);
|
|
|
|
}
|