Merge remote-tracking branch 'scrawl/master'

actorid
Marc Zinnschlag 12 years ago
commit d684120f7a

@ -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

@ -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;

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

Loading…
Cancel
Save