From f6de5cc4d951d2be9ccad08eece506ef791a3cc7 Mon Sep 17 00:00:00 2001 From: RedEnchilada Date: Fri, 20 Feb 2015 02:21:03 +0000 Subject: [PATCH] yellow wanted me to push this cus it fixed md2 translucency for her test cases git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@9045 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/hardware/r_opengl/r_opengl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 76543e259..726009612 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -1910,6 +1910,13 @@ EXPORT void HWRAPI(DrawMD2i) (INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 d pglRotatef(pos->anglex, -1.0f, 0.0f, 0.0f); //pglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // alpha = level of transparency + // Remove depth mask when the model is transparent so it doesn't cut thorugh sprites // SRB2CBTODO: For all stuff too?! + if (color[3] < 255) + { + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // alpha = level of transparency + glDepthMask(GL_FALSE); + } + val = *gl_cmd_buffer++; while (val != 0)