diff --git a/Source/Render/sokol/SokolRenderPipeline.cpp b/Source/Render/sokol/SokolRenderPipeline.cpp index f5b1362a..28bbde9f 100644 --- a/Source/Render/sokol/SokolRenderPipeline.cpp +++ b/Source/Render/sokol/SokolRenderPipeline.cpp @@ -18,9 +18,11 @@ sg_compare_func GetSokolCompareFunc(eCMPFUNC cmpfunc) { return SG_COMPAREFUNC_GREATER; case CMP_GREATEREQUAL: return SG_COMPAREFUNC_GREATER_EQUAL; - default: case CMP_ALWAYS: return SG_COMPAREFUNC_ALWAYS; + default: + xassert(0); + return SG_COMPAREFUNC_ALWAYS; } } diff --git a/Source/Render/sokol/SokolRenderState.cpp b/Source/Render/sokol/SokolRenderState.cpp index 4e9e45b7..a8862cf6 100644 --- a/Source/Render/sokol/SokolRenderState.cpp +++ b/Source/Render/sokol/SokolRenderState.cpp @@ -1133,17 +1133,22 @@ void cSokolRender::SetDrawTransform(class cCamera *pDrawNode) uint32_t cSokolRender::GetRenderState(eRenderStateOption option) { switch(option) { - case RS_WIREFRAME: - return activePipelineMode.wireframe_mode; case RS_ZWRITEENABLE: return activePipelineMode.depth_write; + case RS_ZFUNC: + return activePipelineMode.depth_cmp; + case RS_WIREFRAME: + return activePipelineMode.wireframe_mode; case RS_CULLMODE: return activePipelineMode.cull; case RS_ALPHA_TEST_MODE: return activeCommandAlphaTest; case RS_BILINEAR: return 1; + case RS_FOGENABLE: + return 0; default: + xassert(0); return 0; } }