Exemplo n.º 1
0
/**
 * Renders the scene to a texture.
 */
static void RenderOffscreen()
{
	glBindFramebuffer(GL_FRAMEBUFFER, gSceneFBO);

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

	DrawWaveMesh();

	glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
Exemplo n.º 2
0
/**
 * Renders the scene using the render method.
 */
void RenderScene_Slow()
{
    gGraphicsDevice->SetRenderState(D3DRS_LIGHTING, FALSE);

    // View transformation
    gGraphicsDevice->SetTransform(D3DTS_VIEW, &gViewMatrix);

    // Perspective transformation
    gGraphicsDevice->SetTransform(D3DTS_PROJECTION, &gProjectionMatrix);

    gGraphicsDevice->Clear(0, nullptr, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 255), 1.0f, 0);

    gGraphicsDevice->BeginScene();
    {
        // Render the wave mesh
        DrawWaveMesh();
    }
    gGraphicsDevice->EndScene();

    gGraphicsDevice->Present(nullptr, nullptr, nullptr, nullptr);
}