mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 20:49:12 +12:00
[GL] Add stencil enable to state tracker
This commit is contained in:
parent
03733569e0
commit
b4cc743608
3 changed files with 25 additions and 3 deletions
|
@ -26,6 +26,11 @@ void GLStateManager::resetScissor() {
|
|||
OpenGL::setScissor(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void GLStateManager::resetStencil() {
|
||||
stencilEnabled = false;
|
||||
OpenGL::disableStencil();
|
||||
}
|
||||
|
||||
void GLStateManager::resetVAO() {
|
||||
boundVAO = 0;
|
||||
glBindVertexArray(0);
|
||||
|
@ -50,4 +55,5 @@ void GLStateManager::reset() {
|
|||
resetVBO();
|
||||
resetProgram();
|
||||
resetScissor();
|
||||
resetStencil();
|
||||
}
|
|
@ -207,7 +207,7 @@ void RendererGL::setupBlending() {
|
|||
|
||||
void RendererGL::setupStencilTest(bool stencilEnable) {
|
||||
if (!stencilEnable) {
|
||||
OpenGL::disableStencil();
|
||||
gl.disableStencil();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ void RendererGL::setupStencilTest(bool stencilEnable) {
|
|||
GL_GREATER,
|
||||
GL_GEQUAL
|
||||
};
|
||||
OpenGL::enableStencil();
|
||||
gl.enableStencil();
|
||||
|
||||
const u32 stencilConfig = regs[PICA::InternalRegs::StencilTest];
|
||||
const u32 stencilFunc = getBits<4, 3>(stencilConfig);
|
||||
|
@ -583,7 +583,7 @@ void RendererGL::displayTransfer(u32 inputAddr, u32 outputAddr, u32 inputSize, u
|
|||
gl.disableBlend();
|
||||
gl.disableDepth();
|
||||
gl.disableScissor();
|
||||
OpenGL::disableStencil();
|
||||
gl.disableStencil();
|
||||
gl.setColourMask(true, true, true, true);
|
||||
gl.useProgram(displayProgram);
|
||||
gl.bindVAO(dummyVAO);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue