mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
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:
1 parent
364061a45c
commit
56175bc505
15 files changed
+153
-109
No files matched your search
@@ -28,6 +28,7 @@
|
||||
#endif
|
||||
|
||||
#include "gfx_es2/glsl_program.h"
|
||||
#include "gfx_es2/gl_state.h"
|
||||
#include "math/lin/matrix4x4.h"
|
||||
|
||||
#include "../../Core/Host.h"
|
||||
@@ -80,9 +81,9 @@ void DisplayDrawer_Init()
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
#endif
|
||||
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_BLEND);
|
||||
glstate.cullFace.disable();
|
||||
glstate.depthTest.disable();
|
||||
glstate.blend.disable();
|
||||
//glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
Reference in new issue
Block a user