diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-08-05 23:22:06 -0300 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-08-06 00:59:37 -0300 |
commit | 254582aa35306c7bdebb90b0cd2dda88fe188087 (patch) | |
tree | 35cd21873666116fba7a3fac3df1580e8d59b79a /src/video_core/renderer_opengl/gl_state.h | |
parent | ff68db61bc737327ae122586bedcaf2ce21619ea (diff) |
OpenGL: Fix state tracking in situations with reused object handles
If an OpenGL object is created, bound to a binding using the state
tracker, and then destroyed, a newly created object can be assigned the
same numeric handle by OpenGL. However, even though it is a new object,
and thus needs to be bound to the binding again, the state tracker
compared the current and previous handles and concluded that no change
needed to be made, leading to failure to bind objects in certain cases.
This manifested as broken text in VVVVVV, which this commit fixes along
with similar texturing problems in other games.
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 03b7e26f..3e237902 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -73,6 +73,12 @@ public: /// Apply this state as the current OpenGL state void Apply(); + static void ResetTexture(GLuint id); + static void ResetProgram(GLuint id); + static void ResetBuffer(GLuint id); + static void ResetVertexArray(GLuint id); + static void ResetFramebuffer(GLuint id); + private: static OpenGLState cur_state; }; |