Shadow state to eliminate most redundant GL calls.
This commit is contained in:
@@ -93,15 +93,6 @@ LRESULT WGLControl::WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
|
||||
// TODO(benvanik): profiler present.
|
||||
Profiler::Present();
|
||||
|
||||
// Hacky swap timer.
|
||||
static int swap_count = 0;
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
glScissor(0, 0, 20, 20);
|
||||
float red[] = {swap_count / 60.0f, 0, 0, 1.0f};
|
||||
swap_count = (swap_count + 1) % 60;
|
||||
glClearNamedFramebufferfv(0, GL_COLOR, 0, red);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
}
|
||||
{
|
||||
SCOPE_profile_cpu_i("gpu", "xe::gpu::gl4::WGLControl::SwapBuffers");
|
||||
|
||||
Reference in New Issue
Block a user