mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 14:14:47 +01:00
#188 always clear with opengl/d3d9 renderers
This commit is contained in:
parent
56488f9dac
commit
0e7edc7bd8
@ -421,7 +421,6 @@ DWORD WINAPI d3d9_render_main(void)
|
||||
fpsl_init();
|
||||
|
||||
BOOL needs_update = FALSE;
|
||||
LONG clear_count = 0;
|
||||
|
||||
DWORD timeout = g_ddraw->render.minfps > 0 ? g_ddraw->render.minfps_tick_len : 200;
|
||||
|
||||
@ -434,9 +433,6 @@ DWORD WINAPI d3d9_render_main(void)
|
||||
|
||||
static int tex_index = 0, pal_index = 0;
|
||||
|
||||
if (InterlockedExchange(&g_ddraw->render.clear_screen, FALSE))
|
||||
clear_count = 10;
|
||||
|
||||
fpsl_frame_start();
|
||||
|
||||
EnterCriticalSection(&g_ddraw->cs);
|
||||
@ -538,11 +534,7 @@ DWORD WINAPI d3d9_render_main(void)
|
||||
|
||||
LeaveCriticalSection(&g_ddraw->cs);
|
||||
|
||||
if (clear_count > 0)
|
||||
{
|
||||
clear_count--;
|
||||
IDirect3DDevice9_Clear(g_d3d9.device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
|
||||
}
|
||||
IDirect3DDevice9_Clear(g_d3d9.device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
|
||||
|
||||
IDirect3DDevice9_BeginScene(g_d3d9.device);
|
||||
IDirect3DDevice9_DrawPrimitive(g_d3d9.device, D3DPT_TRIANGLESTRIP, 0, 2);
|
||||
|
@ -589,7 +589,6 @@ static void ogl_init_scale_program()
|
||||
static void ogl_render()
|
||||
{
|
||||
BOOL needs_update = FALSE;
|
||||
LONG clear_count = 0;
|
||||
|
||||
glViewport(
|
||||
g_ddraw->render.viewport.x, g_ddraw->render.viewport.y,
|
||||
@ -620,9 +619,6 @@ static void ogl_render()
|
||||
|
||||
BOOL scale_changed = FALSE;
|
||||
|
||||
if (InterlockedExchange(&g_ddraw->render.clear_screen, FALSE))
|
||||
clear_count = 10;
|
||||
|
||||
fpsl_frame_start();
|
||||
|
||||
EnterCriticalSection(&g_ddraw->cs);
|
||||
@ -746,15 +742,7 @@ static void ogl_render()
|
||||
|
||||
LeaveCriticalSection(&g_ddraw->cs);
|
||||
|
||||
if (g_ddraw->wine)
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
else if (clear_count > 0)
|
||||
{
|
||||
clear_count--;
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
if (scale_changed)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user