Skip to content

Commit

Permalink
GL: Set a plain render state in DrawActiveTexture, without relying on…
Browse files Browse the repository at this point in the history
… the caller having called DisableState
  • Loading branch information
hrydgard committed Feb 8, 2018
1 parent b9b41f5 commit b9081dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions GPU/GLES/FramebufferManagerGLES.cpp
Expand Up @@ -423,6 +423,12 @@ void FramebufferManagerGLES::DrawActiveTexture(float x, float y, float w, float
pos[i * 3 + 1] = pos[i * 3 + 1] * invDestH - 1.0f;
}

// We always want a plain state here.
render_->SetNoBlendAndMask(0xF);
render_->SetDepth(false, false, GL_ALWAYS);
render_->SetStencilDisabled();
render_->SetRaster(false, GL_CCW, GL_FALSE, GL_FALSE);

// Upscaling postshaders don't look well with linear
if (flags & DRAWTEX_LINEAR) {
render_->SetTextureSampler(0, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, GL_LINEAR, GL_LINEAR, 0.0f);
Expand Down

0 comments on commit b9081dd

Please sign in to comment.