Ejemplo n.º 1
0
//----------------------------------------------------------------------------
void DynamicShader::OnIdle()
{
    MeasureTime();

    if( MoveCamera() )
    {
        m_Culler.ComputeUnculledSet(m_spScene);
    }

    //m_spScene->UpdateGS(SESystem::SE_GetTime());  // inefficient
    m_spController->Update(SESystem::SE_GetTime());

    if( MoveObject() )
    {
        m_spScene->UpdateGS();
        m_Culler.ComputeUnculledSet(m_spScene);
    }

    m_pRenderer->ClearBuffers();
    if( m_pRenderer->BeginScene() )
    {
        m_pRenderer->DrawScene(m_Culler.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, SEColorRGBA::SE_RGBA_WHITE);
        m_pRenderer->EndScene();
    }
    m_pRenderer->DisplayBackBuffer();

    UpdateFrameCount();
}
//----------------------------------------------------------------------------
void StructuredBuffersWindow::OnIdle()
{
    MeasureTime();

    MoveCamera();

    memset(mDrawnPixels->GetData(), 0, mDrawnPixels->GetNumBytes());
    mEngine->CopyCpuToGpu(mDrawnPixels);

    mEngine->ClearBuffers();
    mEngine->Draw(mSquare);

    mEngine->CopyGpuToCpu(mDrawnPixels);
    Vector4<float>* src = mDrawnPixels->Get<Vector4<float>>();
    unsigned int* trg = mDrawnPixelsTexture->Get<unsigned int>();
    for (int i = 0; i < mXSize*mYSize; ++i)
    {
        unsigned int r = static_cast<unsigned char>(255.0f*src[i][0]);
        unsigned int g = static_cast<unsigned char>(255.0f*src[i][1]);
        unsigned int b = static_cast<unsigned char>(255.0f*src[i][2]);
        trg[i] = r | (g << 8) | (b << 16) | (0xFF << 24);
    }
    WICFileIO::SaveToPNG("DrawnPixels.png", mDrawnPixelsTexture);

    DrawFrameRate(8, mYSize - 8, mTextColor);
    mEngine->DisplayColorBuffer(0);

    UpdateFrameCount();
}
Ejemplo n.º 3
0
//----------------------------------------------------------------------------
void ReflectionsAndShadows::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mSceneCuller.ComputeVisibleSet(mScene);
        mBipedCuller.ComputeVisibleSet(mBiped);
    }

    if (MoveObject())
    {
        mScene->Update();
        mBiped->Update(mUpdateTime);
        mSceneCuller.ComputeVisibleSet(mScene);
        mBipedCuller.ComputeVisibleSet(mBiped);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mSceneCuller.GetVisibleSet());
        mRenderer->Draw(mBipedCuller.GetVisibleSet(), mPSEffect);
        mRenderer->Draw(mBipedCuller.GetVisibleSet(), mPREffect);
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 4
0
//----------------------------------------------------------------------------
void CollisionsMovingSpheres::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

#ifndef SINGLE_STEP
    UpdateSpheres();
#endif

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 5
0
//----------------------------------------------------------------------------
void Delaunay3D::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
//----------------------------------------------------------------------------
void IntersectConvexPolyhedra::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 7
0
//----------------------------------------------------------------------------
void Skinning::OnIdle ()
{
    MeasureTime();

    UpdateConstants((float)GetTimeInSeconds());

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 8
0
//----------------------------------------------------------------------------
void PolygonOffsets::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        mRenderer->Draw(8, 16, mTextColor,
            "Press UP/DOWN arrows. "
            "The left box flickers, the right does not");
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 9
0
//----------------------------------------------------------------------------
void BouncingSpheres::OnIdle ()
{
    MeasureTime();
    PhysicsTick();
    GraphicsTick();
    UpdateFrameCount();
}
Ejemplo n.º 10
0
//----------------------------------------------------------------------------
void NonlocalBlowup::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        mRenderer->PostDraw();
        if (mTakeSnapshot)
        {
            GetSnapshot();
            mTakeSnapshot = false;
        }
        mRenderer->DisplayColorBuffer();
    }

#ifndef SINGLE_STEP
    ExecuteSolver();
#endif

    UpdateFrameCount();
}
Ejemplo n.º 11
0
//----------------------------------------------------------------------------
void WrigglingSnake::OnIdle ()
{
    MeasureTime();

    MoveCamera();
    if (MoveObject())
    {
        mScene->Update();
    }

#ifndef SINGLE_STEP
    ModifyCurve();
#endif

    mCuller.ComputeVisibleSet(mScene);

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 12
0
//----------------------------------------------------------------------------
void Castle::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());

        DrawFrameRate(8, GetHeight()-8, mTextColor);
        if (mPickMessage[0])
        {
            mRenderer->Draw(8, 16, mTextColor, mPickMessage);
        }

        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 13
0
//----------------------------------------------------------------------------
void PerformanceAMDWindow::OnIdle()
{
    MeasureTime();

    MoveCamera();
    UpdateConstants();

    mEngine->ClearBuffers();

    mPerformance.Profile([this]()
    {
        mEngine->Execute(mGenerateTexture, mNumXGroups, mNumYGroups, 1);
        mEngine->Draw(mTriangles);
    });

    // Compute the average measurements.  GetAverage allows you to access
    // the measurements during application run time.  SaveAverage calls
    // GetAverage and writes the results to a spreadsheet.
    std::vector<std::vector<AMDPerformance::Measurement>> measurements;
    if (mPerformance.GetNumProfileCalls() == 16)
    {
        mPerformance.GetAverage(measurements);
        mPerformance.SaveAverage("ProfileResults.csv");
    }

    DrawFrameRate(8, mYSize - 8, mTextColor);
    mEngine->DisplayColorBuffer(0);

    UpdateFrameCount();
}
Ejemplo n.º 14
0
//----------------------------------------------------------------------------
void SphereMaps::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        CopyNormalToTCoord1(mScene);
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 15
0
//----------------------------------------------------------------------------
void ConvexHull3D::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        mRenderer->Draw(8, 16, mTextColor, mHeader);
        mRenderer->Draw(8, GetHeight()-8, mTextColor, mFooter);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 16
0
//----------------------------------------------------------------------------
void DefaultShader::OnIdle()
{
    // Rotate the box.
    SEMatrix3f mat3fRot;
    mat3fRot.FromEulerAnglesXYZ(-0.02f, 0.02f, -0.02f);
    m_spMesh->Local.SetRotate(m_spMesh->Local.GetRotate()*mat3fRot);
    m_spMesh->UpdateGS();
    
    MeasureTime();

    if( MoveCamera() )
    {
        m_Culler.ComputeUnculledSet(m_spScene);
    }
    
    if( MoveObject() )
    {
        m_spScene->UpdateGS();
        m_Culler.ComputeUnculledSet(m_spScene);
    }
    
    m_pRenderer->ClearBuffers();
    if( m_pRenderer->BeginScene() )
    {
        m_pRenderer->DrawScene(m_Culler.GetVisibleSet());

        m_pRenderer->EndScene();
    }
    m_pRenderer->DisplayBackBuffer();
    
    UpdateFrameCount();
}
//----------------------------------------------------------------------------
void BouncingTetrahedra::OnIdle ()
{
    MeasureTime();
    PhysicsTick();
    GraphicsTick();
    UpdateFrameCount();
}
Ejemplo n.º 18
0
//----------------------------------------------------------------------------
void ClodMeshes::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, mTextColor);

#ifdef USE_CLOD_MESH
        char message[256];
        sprintf(message, "triangles0: %4d   triangles1: %4d",
            mClod[0]->GetNumTriangles(), mClod[1]->GetNumTriangles());
        mRenderer->Draw(128, GetHeight()-8, mTextColor, message);
#endif

        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 19
0
//----------------------------------------------------------------------------
void Lighting2::OnIdle()
{
    // Lights motion.
    static double dCurTime = 0.0f;
    static double dLastTime = 0.0f;
    static float fAngel0 = 0.0f;
    static float fAngel1 = SEMathf::PI;
    static float fRadius0 = 4.0f;
    static float fRadius1 = 4.0f;
    dCurTime = SESystem::SE_GetTime();
    if( dCurTime - dLastTime > 0.0001f )
    {
        dLastTime = dCurTime;
        fAngel0 += 0.04f;
        fAngel1 -= 0.04f;
        SEMatrix3f mat3fRot;

        mat3fRot.FromEulerAnglesXYZ(0.0f, -0.04f, 0.0f);
        m_spLight0Node->Local.SetRotate(m_spLight0Node->Local.GetRotate()
										*mat3fRot);
        float fX = fRadius0*SEMathf::Cos(fAngel0);
        float fZ = fRadius0*SEMathf::Sin(fAngel0);
        m_spLight0Node->Local.SetTranslate(SEVector3f(fX, m_fLight0Height, 
            fZ));
        m_spLight0Node->UpdateGS();

        mat3fRot.FromEulerAnglesXYZ(0.0f, 0.04f, 0.0f);
        m_spLight1Node->Local.SetRotate(m_spLight1Node->Local.GetRotate()
										*mat3fRot);
        fX = fRadius1*SEMathf::Cos(fAngel1);
        fZ = fRadius1*SEMathf::Sin(fAngel1);
        m_spLight1Node->Local.SetTranslate(SEVector3f(fX, m_fLight1Height, 
            fZ));
        m_spLight1Node->UpdateGS();
    }

    MeasureTime();

    if( MoveCamera() )
    {
        m_Culler.ComputeUnculledSet(m_spScene);
    }

    if( MoveObject() )
    {
        m_spScene->UpdateGS();
        m_Culler.ComputeUnculledSet(m_spScene);
    }

    m_pRenderer->ClearBuffers();
    if( m_pRenderer->BeginScene() )
    {
        m_pRenderer->DrawScene(m_Culler.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, SEColorRGBA::SE_RGBA_WHITE);
        m_pRenderer->EndScene();
    }
    m_pRenderer->DisplayBackBuffer();

    UpdateFrameCount();
}
Ejemplo n.º 20
0
//----------------------------------------------------------------------------
void BlendedAnimations::OnIdle ()
{
	MeasureTime();

	if (MoveObject())
	{
		mScene->Update(mAnimTime);
	}

	Update();

	if (mRenderer->PreDraw())
	{
		mRenderer->ClearBuffers();
		mRenderer->Draw(mVisibleSet);

		mRenderer->Draw(8, 16, mTextColor,
		                "Press UP-ARROW to transition from idle to walk.");

		mRenderer->Draw(8, 40, mTextColor,
		                "Press SHIFT-UP-ARROW to transition from walk to run.");

		char message[128];
		sprintf(message, "time = %6.4lf", mAnimTime);
		mRenderer->Draw(128, GetHeight()-8, mTextColor, message);

		DrawFrameRate(8, GetHeight()-8, mTextColor);

		mRenderer->PostDraw();
		mRenderer->DisplayColorBuffer();
	}

	UpdateFrameCount();
}
Ejemplo n.º 21
0
//----------------------------------------------------------------------------
void BouncingBall::OnIdle ()
{
    MeasureTime();

#ifndef SINGLE_STEP
    PhysicsTick();
#endif

    GraphicsTick();

    UpdateFrameCount();
}
Ejemplo n.º 22
0
//----------------------------------------------------------------------------
void WireMeshWindow::OnIdle()
{
    MeasureTime();
    MoveCamera();

    mEngine->ClearBuffers();
    mEngine->Draw(mMesh);
    DrawFrameRate(8, mYSize-8, mTextColor);
    mEngine->DisplayColorBuffer(0);

    UpdateFrameCount();
}
Ejemplo n.º 23
0
//----------------------------------------------------------------------------
void GpuGaussianBlur3::OnIdle ()
{
    MeasureTime();

    if (mRenderer->PreDraw())
    {
        mIP->ExecuteStep(mRenderer, true);
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 24
0
//----------------------------------------------------------------------------
void HelixTubeSurface::OnIdle ()
{
    MeasureTime();

    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 25
0
//----------------------------------------------------------------------------
void GpuFluids2D::OnIdle ()
{
    MeasureTime();

    if (mRenderer->PreDraw())
    {
        mSmoke->DoSimulationStep();

        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 26
0
//----------------------------------------------------------------------------
void Fluids3D::OnIdle ()
{
    MeasureTime();

#ifdef USE_PARTICLES
    bool particlesNeedUpdate = false;
#endif
    mIndexBufferNeedsUpdate = false;

    if (MoveCamera())
    {
#ifdef USE_PARTICLES
        particlesNeedUpdate = true;
#endif
        mIndexBufferNeedsUpdate = true;
    }

    if (MoveObject())
    {
#ifdef USE_PARTICLES
        particlesNeedUpdate = true;
#endif
        mIndexBufferNeedsUpdate = true;
        mScene->Update();
    }

#ifdef USE_PARTICLES
    if (particlesNeedUpdate)
    {
        mCube->GenerateParticles(mCamera);
    }
#endif

    if (mIndexBufferNeedsUpdate)
    {
        UpdateIndexBuffer();
        mIndexBufferNeedsUpdate = false;
    }

    if (!mSingleStep)
    {
        PhysicsTick();
    }

    GraphicsTick();

    UpdateFrameCount();
}
Ejemplo n.º 27
0
//----------------------------------------------------------------------------
void MultipleRenderTargets::OnIdle ()
{
    MeasureTime();

    if (MoveCamera())
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    if (MoveObject())
    {
        mScene->Update();
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mRenderer->PreDraw())
    {
        // Draw the scene to a multiple render target.
        mRenderer->Enable(mRenderTarget);
        mRenderer->SetClearColor(mClearWhite);
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        mRenderer->Disable(mRenderTarget);

        // Draw the scene to the main window.
        mRenderer->SetClearColor(mClearGray);
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());

        // Draw a screen polygon in the lower-left corner of the main window.
        // This polygon has render target 0 as its texture.
        mRenderer->SetCamera(mScreenCamera);
        mRenderer->Draw(mScreenPolygon0);

        // Draw a screen polygon in the lower-right corner of the main window.
        // This polygon has render target 1 as its texture.
        mRenderer->Draw(mScreenPolygon1);

        // Restore the main camera to draw the frame rate.
        mRenderer->SetCamera(mCamera);
        DrawFrameRate(8, 16, mTextColor);

        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
//----------------------------------------------------------------------------
void FreeFormDeformation::OnIdle ()
{
    MeasureTime();

    bool needsCulling = false;
    if (MoveCamera())
    {
        needsCulling = true;
    }

    if (MoveObject())
    {
        mScene->Update();
        needsCulling = true;
        mCuller.ComputeVisibleSet(mScene);
    }

    if (mDoRandom)
    {
        // Deform the mesh no faster than 30 frames per second.
        float time = (float)GetTimeInSeconds();
        if (time - mLastUpdateTime >= 0.0333333f)
        {
            mLastUpdateTime = time;
            DoRandomControlPoints();
            mScene->Update();
            needsCulling = true;
        }
    }

    if (needsCulling)
    {
        mCuller.ComputeVisibleSet(mScene);
    }

    // Draw the scene as fast as possible (not limited to 30 fps).
    if (mRenderer->PreDraw())
    {
        mRenderer->ClearBuffers();
        mRenderer->Draw(mCuller.GetVisibleSet());
        DrawFrameRate(8, GetHeight()-8, mTextColor);
        mRenderer->PostDraw();
        mRenderer->DisplayColorBuffer();
    }

    UpdateFrameCount();
}
Ejemplo n.º 29
0
//----------------------------------------------------------------------------
void ScreenPolygons::OnIdle ()
{
	MeasureTime();

	if (MoveCamera())
	{
		mCuller.ComputeVisibleSet(mScene);
	}

	if (MoveObject())
	{
		mScene->Update();
		mCuller.ComputeVisibleSet(mScene);
	}

	mRenderer->ClearDepthBuffer();
	mRenderer->ClearColorBuffer();
	if (mRenderer->PreDraw())
	{
		// Draw the background and middle polygons.
		mRenderer->SetCamera(mScreenCamera);
		mRenderer->Draw(mBackPoly);
		mRenderer->Draw(mMidPoly);

		// Draw the biped.
		mRenderer->SetCamera(mCamera);
		mRenderer->Draw(mCuller.GetVisibleSet());

		// Draw the foreground polygon last since it has transparency.
		mRenderer->SetCamera(mScreenCamera);
		mRenderer->Draw(mForePoly);

		// Text goes on top of foreground polygon.
		mRenderer->SetCamera(mCamera);
		DrawFrameRate(8, GetHeight()-8, mTextColor);

		char message[128];
		sprintf(message, "linear z = %f , perspective z = %f", mLinearZ,
		        mDepthZ);
		mRenderer->Draw(8, 16, mTextColor, message);

		mRenderer->PostDraw();
		mRenderer->DisplayColorBuffer();
	}

	UpdateFrameCount();
}
//----------------------------------------------------------------------------
void PlaneMeshIntersectionWindow::OnIdle()
{
    MeasureTime();
    MoveCamera();
    UpdateMatrices();

    mEngine->Enable(mPSTarget);
    mEngine->ClearBuffers();
    mEngine->Draw(mMesh);
    mEngine->Disable(mPSTarget);
    mEngine->Execute(mDrawIntersections, mXSize / 8, mYSize / 8, 1);
    mEngine->Draw(mOverlay);
    DrawFrameRate(8, mYSize - 8, mTextColor);
    mEngine->DisplayColorBuffer(0);

    UpdateFrameCount();
}