Set the right depth mode when autosort is on
This commit is contained in:
parent
cde0abd18d
commit
a79c1dd753
|
@ -1138,6 +1138,9 @@ GL_FORCE_INLINE void push(PolyHeader* header, GLboolean multiTextureHeader, Poly
|
|||
cxt.blend.src = GPU_BLEND_SRCALPHA;
|
||||
cxt.blend.dst = GPU_BLEND_INVSRCALPHA;
|
||||
cxt.depth.comparison = GPU_DEPTHCMP_LEQUAL;
|
||||
} else if(cxt.list_type == GPU_LIST_TR_POLY && AUTOSORT_ENABLED) {
|
||||
/* Autosort mode requires this mode for transparent polys */
|
||||
cxt.depth.comparison = GPU_DEPTHCMP_GEQUAL;
|
||||
}
|
||||
|
||||
_glUpdatePVRTextureContext(&cxt, textureUnit);
|
||||
|
|
|
@ -15,6 +15,8 @@ PolyList TR_LIST;
|
|||
|
||||
#define FAST_MODE GL_FALSE
|
||||
|
||||
GLboolean AUTOSORT_ENABLED = GL_FALSE;
|
||||
|
||||
PolyList* _glOpaquePolyList() {
|
||||
return &OP_LIST;
|
||||
}
|
||||
|
@ -54,6 +56,8 @@ void APIENTRY glKosInitEx(GLdcConfig* config) {
|
|||
|
||||
InitGPU(config->autosort_enabled, config->fsaa_enabled);
|
||||
|
||||
AUTOSORT_ENABLED = config->autosort_enabled;
|
||||
|
||||
_glInitMatrices();
|
||||
_glInitAttributePointers();
|
||||
_glInitContext();
|
||||
|
|
|
@ -339,6 +339,7 @@ void _glApplyColorTable(TexturePalette *palette);
|
|||
|
||||
extern GLboolean BLEND_ENABLED;
|
||||
extern GLboolean ALPHA_TEST_ENABLED;
|
||||
extern GLboolean AUTOSORT_ENABLED;
|
||||
|
||||
GL_FORCE_INLINE GLboolean _glIsBlendingEnabled() {
|
||||
return BLEND_ENABLED;
|
||||
|
|
Loading…
Reference in New Issue
Block a user