Shadow state to eliminate most redundant GL calls.

This commit is contained in:
Ben Vanik
2015-01-03 02:57:58 -08:00
parent 858f70549f
commit 07a82200f9
4 changed files with 320 additions and 160 deletions

View File

@@ -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");