mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
GL: Fix clearing alpha on stencil uploads.
This commit is contained in:
parent
d9af90e016
commit
3c93eaf164
@ -150,7 +150,7 @@ enum DrawTextureFlags {
|
||||
DRAWTEX_NEAREST = 0,
|
||||
DRAWTEX_LINEAR = 1,
|
||||
DRAWTEX_KEEP_TEX = 2,
|
||||
DRAWTEX_KEEP_STENCIL = 4,
|
||||
DRAWTEX_KEEP_STENCIL_ALPHA = 4,
|
||||
};
|
||||
|
||||
inline Draw::DataFormat GEFormatToThin3D(int geFormat) {
|
||||
|
@ -420,10 +420,10 @@ void FramebufferManagerGLES::DrawActiveTexture(float x, float y, float w, float
|
||||
}
|
||||
|
||||
// We always want a plain state here, well, except for when it's used by the stencil stuff...
|
||||
render_->SetNoBlendAndMask(0xF);
|
||||
render_->SetDepth(false, false, GL_ALWAYS);
|
||||
render_->SetRaster(false, GL_CCW, GL_FRONT, GL_FALSE);
|
||||
if (!(flags & DRAWTEX_KEEP_STENCIL)) {
|
||||
if (!(flags & DRAWTEX_KEEP_STENCIL_ALPHA)) {
|
||||
render_->SetNoBlendAndMask(0xF);
|
||||
render_->SetStencilDisabled();
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ bool FramebufferManagerGLES::NotifyStencilUpload(u32 addr, int size, bool skipZe
|
||||
render_->SetStencilOp(i, GL_REPLACE, GL_REPLACE, GL_REPLACE);
|
||||
render_->SetUniformF1(&u_stencilValue, i * (1.0f / 255.0f));
|
||||
}
|
||||
DrawActiveTexture(0, 0, dstBuffer->width, dstBuffer->height, dstBuffer->bufferWidth, dstBuffer->bufferHeight, 0.0f, 0.0f, u1, v1, ROTATION_LOCKED_HORIZONTAL, DRAWTEX_NEAREST | DRAWTEX_KEEP_STENCIL);
|
||||
DrawActiveTexture(0, 0, dstBuffer->width, dstBuffer->height, dstBuffer->bufferWidth, dstBuffer->bufferHeight, 0.0f, 0.0f, u1, v1, ROTATION_LOCKED_HORIZONTAL, DRAWTEX_NEAREST | DRAWTEX_KEEP_STENCIL_ALPHA);
|
||||
}
|
||||
|
||||
if (useBlit) {
|
||||
|
Loading…
Reference in New Issue
Block a user