Defer blend, cull and depth test changes to draw command

Avoid unnecessary state changes and reduces the amount of OpenGL calls.
It also puts all the interesting logic at the same place, reducing the
complexity a little.
This commit is contained in:
Florent Castelli committed 2012-11-24 15:19:29 +01:00
1 parent 364061a45c
commit 56175bc505
15 files changed
+153 -109

No files matched your search

+2
View File
@@ -14,6 +14,7 @@
#include <windows.h>
#include <GL/gl.h> // Header File For The OpenGL32 Library
#include "../native/gfx_es2/gl_state.h"
#include "OpenGLBase.h"
@@ -138,6 +139,7 @@ bool GL_Init(HWND window)
setVSync(0);
glewInit();
glstate.Initialize();
GL_Resized(); // Set Up Our Perspective GL Screen