Renderer/Texture: Set up compare mode
Former-commit-id: 6f85b6956530ea27b5bb96eb9b51a3ddc702f71b
This commit is contained in:
parent
6a2e0da88f
commit
fabe42dc3a
|
|
@ -1269,6 +1269,12 @@ bool NzTexture::CreateTexture(bool proxy)
|
||||||
glTexParameteri(target, GL_TEXTURE_SWIZZLE_A, openGLFormat.swizzle[3]);
|
glTexParameteri(target, GL_TEXTURE_SWIZZLE_A, openGLFormat.swizzle[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!proxy && NzPixelFormat::GetType(m_impl->format) == nzPixelFormatType_Depth)
|
||||||
|
{
|
||||||
|
glTexParameteri(target, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE);
|
||||||
|
glTexParameteri(target, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue