void App::RenderTerrain2( bool bReset, float fTime, float fElapsedTime ) { g_ResetTerrain = bReset; if (g_ResetTerrain) { g_ResetTerrain = false; DeformInitTerrain(context); } renderer->changeToMainFramebuffer(); ID3D11DeviceContext* pContext = GetApp()->GetContext(); ID3D11RenderTargetView* pBackBufferRTV; ID3D11DepthStencilView* pBackBufferDSV; pContext->OMGetRenderTargets(1, &pBackBufferRTV, &pBackBufferDSV); // Clear render target and the depth stencil float ClearColor[4] = { 1.0f, 0.0f, 1.0f, 1.0f }; // Purple to better spot terrain cracks (disable sky cube). //float ClearColor[4] = { 0.465f, 0.725f, 0.0f, 1.0f }; // NV green for colour-consistent illustrations. pContext->ClearRenderTargetView(pBackBufferRTV, ClearColor); pContext->ClearDepthStencilView(pBackBufferDSV, D3D11_CLEAR_DEPTH, 1.0, 0); // ¸®»çÀÌ¡½Ã Error! pContext->OMSetRenderTargets(1, &pBackBufferRTV, pBackBufferDSV); RenderToBackBuffer(renderer, fTime, fElapsedTime, NULL); }
void ALSoftwareGraphicsDriver::Render(GlobalFlipType flip) { RenderToBackBuffer(); if (_autoVsync) this->Vsync(); if (flip == None) _filter->RenderScreen(virtualScreen, _global_x_offset, _global_y_offset); else _filter->RenderScreenFlipped(virtualScreen, _global_x_offset, _global_y_offset, (int)flip); }