diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-26 05:50:38 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-28 21:25:18 +0100 |
commit | d3e433a38048c5d32c0929446008586e975ccd0e (patch) | |
tree | 06ac0719687b366f6c82b3c78d8df99b7bf33a69 /src/video_core/renderer_opengl/gl_state.cpp | |
parent | gl_state: Remove scissor test tracking (diff) | |
download | yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.gz yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.bz2 yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.lz yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.xz yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.zst yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index dcea16fd3..7c08cc3c2 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -85,10 +85,6 @@ void Enable(GLenum cap, GLuint index, bool& current_value, bool new_value) { OpenGLState::OpenGLState() = default; -void OpenGLState::SetDefaultViewports() { - viewports.fill(Viewport{}); -} - void OpenGLState::ApplyFramebufferState() { if (UpdateValue(cur_state.draw.read_framebuffer, draw.read_framebuffer)) { glBindFramebuffer(GL_READ_FRAMEBUFFER, draw.read_framebuffer); @@ -150,30 +146,6 @@ void OpenGLState::ApplyStencilTest() { ConfigStencil(GL_BACK, stencil.back, cur_state.stencil.back); } -void OpenGLState::ApplyViewport() { - for (GLuint i = 0; i < static_cast<GLuint>(Maxwell::NumViewports); ++i) { - const auto& updated = viewports[i]; - auto& current = cur_state.viewports[i]; - - if (current.x != updated.x || current.y != updated.y || current.width != updated.width || - current.height != updated.height) { - current.x = updated.x; - current.y = updated.y; - current.width = updated.width; - current.height = updated.height; - glViewportIndexedf(i, static_cast<GLfloat>(updated.x), static_cast<GLfloat>(updated.y), - static_cast<GLfloat>(updated.width), - static_cast<GLfloat>(updated.height)); - } - if (current.depth_range_near != updated.depth_range_near || - current.depth_range_far != updated.depth_range_far) { - current.depth_range_near = updated.depth_range_near; - current.depth_range_far = updated.depth_range_far; - glDepthRangeIndexed(i, updated.depth_range_near, updated.depth_range_far); - } - } -} - void OpenGLState::ApplyGlobalBlending() { const Blend& updated = blend[0]; Blend& current = cur_state.blend[0]; @@ -283,7 +255,6 @@ void OpenGLState::Apply() { ApplyProgramPipeline(); ApplyClipDistances(); ApplyRasterizerDiscard(); - ApplyViewport(); ApplyStencilTest(); ApplyBlending(); ApplyTextures(); |