1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 20:45:32 +00:00

Merge remote-tracking branch 'scrawl/master'

This commit is contained in:
Marc Zinnschlag 2013-05-13 20:47:50 +02:00
commit d684120f7a
3 changed files with 13 additions and 1 deletions

View file

@ -428,6 +428,10 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
MWBase::Environment::get().getWorld()->changeToInteriorCell (mCellName, pos);
}
Ogre::FrameEvent event;
event.timeSinceLastEvent = 0;
event.timeSinceLastFrame = 0;
frameRenderingQueued(event);
mOgre->getRoot()->addFrameListener (this);
// scripts

View file

@ -18,7 +18,8 @@ OcclusionQuery::OcclusionQuery(OEngine::Render::OgreRenderer* renderer, SceneNod
mSunTotalAreaQuery(0), mSunVisibleAreaQuery(0), mActiveQuery(0),
mDoQuery(0), mSunVisibility(0),
mWasVisible(false),
mActive(false)
mActive(false),
mFirstFrame(true)
{
mRendering = renderer;
mSunNode = sunNode;
@ -147,6 +148,12 @@ void OcclusionQuery::renderQueueEnded(uint8 queueGroupId, const String& invocati
void OcclusionQuery::update(float duration)
{
if (mFirstFrame)
{
// GLHardwareOcclusionQuery::isStillOutstanding doesn't seem to like getting called when nothing has been rendered yet
mFirstFrame = false;
return;
}
if (!mSupported) return;
mWasVisible = false;

View file

@ -59,6 +59,7 @@ namespace MWRender
bool mWasVisible;
bool mActive;
bool mFirstFrame;
bool mSupported;
bool mDoQuery;