mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
only clear if needed
This commit is contained in:
parent
1cfce3f321
commit
a62ebdc203
@ -534,7 +534,10 @@ DWORD WINAPI d3d9_render_main(void)
|
|||||||
|
|
||||||
LeaveCriticalSection(&g_ddraw->cs);
|
LeaveCriticalSection(&g_ddraw->cs);
|
||||||
|
|
||||||
IDirect3DDevice9_Clear(g_d3d9.device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
|
if (g_ddraw->render.viewport.x != 0 || g_ddraw->render.viewport.y != 0)
|
||||||
|
{
|
||||||
|
IDirect3DDevice9_Clear(g_d3d9.device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
|
||||||
|
}
|
||||||
|
|
||||||
IDirect3DDevice9_BeginScene(g_d3d9.device);
|
IDirect3DDevice9_BeginScene(g_d3d9.device);
|
||||||
IDirect3DDevice9_DrawPrimitive(g_d3d9.device, D3DPT_TRIANGLESTRIP, 0, 2);
|
IDirect3DDevice9_DrawPrimitive(g_d3d9.device, D3DPT_TRIANGLESTRIP, 0, 2);
|
||||||
|
@ -755,7 +755,10 @@ static void ogl_render()
|
|||||||
|
|
||||||
LeaveCriticalSection(&g_ddraw->cs);
|
LeaveCriticalSection(&g_ddraw->cs);
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
if (g_ddraw->render.viewport.x != 0 || g_ddraw->render.viewport.y != 0)
|
||||||
|
{
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
if (scale_changed)
|
if (scale_changed)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user