summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-06 05:53:27 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-06 20:49:24 +0100
commit35c095898bf51098d9b2a71447850f3e1b0fc350 (patch)
tree38775f691f339e341330211185bd9dc0cf766442 /src/video_core/renderer_opengl/gl_state.cpp
parentgl_state: Drop uniform buffer state tracking (diff)
downloadyuzu-35c095898bf51098d9b2a71447850f3e1b0fc350.tar
yuzu-35c095898bf51098d9b2a71447850f3e1b0fc350.tar.gz
yuzu-35c095898bf51098d9b2a71447850f3e1b0fc350.tar.bz2
yuzu-35c095898bf51098d9b2a71447850f3e1b0fc350.tar.lz
yuzu-35c095898bf51098d9b2a71447850f3e1b0fc350.tar.xz
yuzu-35c095898bf51098d9b2a71447850f3e1b0fc350.tar.zst
yuzu-35c095898bf51098d9b2a71447850f3e1b0fc350.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index e54aff995..79bb52ddf 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -83,7 +83,6 @@ OpenGLState::OpenGLState() {
draw.read_framebuffer = 0;
draw.draw_framebuffer = 0;
draw.vertex_array = 0;
- draw.vertex_buffer = 0;
draw.shader_program = 0;
draw.program_pipeline = 0;
@@ -513,18 +512,6 @@ void OpenGLState::ApplyFramebufferState() const {
}
}
-void OpenGLState::ApplyVertexBufferState() const {
- // Vertex array
- if (draw.vertex_array != cur_state.draw.vertex_array) {
- glBindVertexArray(draw.vertex_array);
- }
-
- // Vertex buffer
- if (draw.vertex_buffer != cur_state.draw.vertex_buffer) {
- glBindBuffer(GL_ARRAY_BUFFER, draw.vertex_buffer);
- }
-}
-
void OpenGLState::ApplyDepthClamp() const {
if (depth_clamp.far_plane == cur_state.depth_clamp.far_plane &&
depth_clamp.near_plane == cur_state.depth_clamp.near_plane) {
@@ -542,7 +529,11 @@ void OpenGLState::ApplyDepthClamp() const {
void OpenGLState::Apply() const {
ApplyFramebufferState();
- ApplyVertexBufferState();
+
+ // Vertex array
+ if (draw.vertex_array != cur_state.draw.vertex_array) {
+ glBindVertexArray(draw.vertex_array);
+ }
// Shader program
if (draw.shader_program != cur_state.draw.shader_program) {
@@ -633,13 +624,6 @@ OpenGLState& OpenGLState::ResetPipeline(GLuint handle) {
return *this;
}
-OpenGLState& OpenGLState::ResetBuffer(GLuint handle) {
- if (draw.vertex_buffer == handle) {
- draw.vertex_buffer = 0;
- }
- return *this;
-}
-
OpenGLState& OpenGLState::ResetVertexArray(GLuint handle) {
if (draw.vertex_array == handle) {
draw.vertex_array = 0;