mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 20:49:12 +12:00
Mooore
This commit is contained in:
parent
adb78bf838
commit
73321856c8
4 changed files with 53 additions and 29 deletions
|
@ -3,9 +3,11 @@
|
|||
void GLStateManager::resetBlend() {
|
||||
blendEnabled = false;
|
||||
logicOpEnabled = false;
|
||||
logicOp = GL_COPY;
|
||||
|
||||
OpenGL::disableBlend();
|
||||
OpenGL::disableLogicOp();
|
||||
OpenGL::setLogicOp(GL_COPY);
|
||||
}
|
||||
|
||||
void GLStateManager::resetClipping() {
|
||||
|
@ -39,7 +41,10 @@ void GLStateManager::resetScissor() {
|
|||
|
||||
void GLStateManager::resetStencil() {
|
||||
stencilEnabled = false;
|
||||
stencilMask = 0xff;
|
||||
|
||||
OpenGL::disableStencil();
|
||||
OpenGL::setStencilMask(0xff);
|
||||
}
|
||||
|
||||
void GLStateManager::resetVAO() {
|
||||
|
|
|
@ -184,7 +184,7 @@ void RendererGL::setupBlending() {
|
|||
|
||||
if (!blendingEnabled) { // Logic ops are enabled
|
||||
const u32 logicOp = getBits<0, 4>(regs[PICA::InternalRegs::LogicOp]);
|
||||
glLogicOp(logicOps[logicOp]);
|
||||
gl.setLogicOp(logicOps[logicOp]);
|
||||
|
||||
// If logic ops are enabled we don't need to disable blending because they override it
|
||||
gl.enableLogicOp();
|
||||
|
@ -243,7 +243,7 @@ void RendererGL::setupStencilTest(bool stencilEnable) {
|
|||
const u32 stencilBufferMask = stencilWrite ? getBits<8, 8>(stencilConfig) : 0;
|
||||
|
||||
glStencilFunc(stencilFuncs[stencilFunc], reference, stencilRefMask);
|
||||
glStencilMask(stencilBufferMask);
|
||||
gl.setStencilMask(stencilBufferMask);
|
||||
|
||||
static constexpr std::array<GLenum, 8> stencilOps = {
|
||||
GL_KEEP,
|
||||
|
@ -489,7 +489,7 @@ void RendererGL::clearBuffer(u32 startAddress, u32 endAddress, u32 value, u32 co
|
|||
|
||||
if (format == DepthFmt::Depth24Stencil8) {
|
||||
const u8 stencil = (value >> 24);
|
||||
OpenGL::setStencilMask(0xff);
|
||||
gl.setStencilMask(0xff);
|
||||
OpenGL::setClearStencil(stencil);
|
||||
OpenGL::clearDepthAndStencil();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue