mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-02 10:14:48 +12:00
[OpenGL] Same for depth func
This commit is contained in:
parent
7307bd270b
commit
52c7783ae1
3 changed files with 18 additions and 5 deletions
src
|
@ -897,13 +897,13 @@ void Renderer::drawVertices(PICA::PrimType primType, std::span<const Vertex> ver
|
|||
if (depthEnable) {
|
||||
gl.enableDepth();
|
||||
gl.setDepthMask(depthWriteEnable ? GL_TRUE : GL_FALSE);
|
||||
glDepthFunc(depthModes[depthFunc]);
|
||||
gl.setDepthFunc(depthModes[depthFunc]);
|
||||
bindDepthBuffer();
|
||||
} else {
|
||||
if (depthWriteEnable) {
|
||||
gl.enableDepth();
|
||||
gl.setDepthMask(GL_TRUE);
|
||||
glDepthFunc(GL_ALWAYS);
|
||||
gl.setDepthFunc(GL_ALWAYS);
|
||||
bindDepthBuffer();
|
||||
} else {
|
||||
gl.disableDepth();
|
||||
|
|
|
@ -13,9 +13,11 @@ void GLStateManager::resetColourMask() {
|
|||
void GLStateManager::resetDepth() {
|
||||
depthEnabled = false;
|
||||
depthMask = true;
|
||||
depthFunc = GL_LESS;
|
||||
|
||||
OpenGL::disableDepth();
|
||||
OpenGL::setDepthMask(true);
|
||||
OpenGL::setDepthFunc(OpenGL::DepthFunc::Less);
|
||||
}
|
||||
|
||||
void GLStateManager::resetScissor() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue