--- deliantra/Deliantra-Client/Client.xs 2008/12/24 04:09:26 1.289 +++ deliantra/Deliantra-Client/Client.xs 2009/11/26 07:19:11 1.291 @@ -2368,7 +2368,13 @@ int x, y; glEnable (GL_TEXTURE_2D); - glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + /* GL_REPLACE would be correct, as we don't need to modulate alpha, + * but the nvidia driver (185.18.14) mishandles alpha textures + * ansd takes the colour from god knows where instead of using + * Cp. MODULATE results in the same colour, but slightly different + * alpha, but atcually gives us the correct colour with nvidia. + */ + glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBegin (GL_QUADS); @@ -2385,7 +2391,7 @@ float tx1 = m & 0x40 ? 0.5 : 0.; float tx2 = tx1 + 0.5; - glColor4f (c[0], c[1], c[2], 0.75); + glColor4f (c[0], c[1], c[2], 1); glTexCoord2f (tx1, 0.); glVertex2i (x , y ); glTexCoord2f (tx1, 1.); glVertex2i (x , y + 1); glTexCoord2f (tx2, 1.); glVertex2i (x + 1, y + 1); @@ -2952,6 +2958,9 @@ const_iv (GL_V3F), const_iv (GL_T2F_V3F), const_iv (GL_T2F_N3F_V3F), + const_iv (GL_FUNC_ADD), + const_iv (GL_FUNC_SUBTRACT), + const_iv (GL_FUNC_REVERSE_SUBTRACT), # undef const_iv }; @@ -2968,6 +2977,9 @@ gl.BlendFuncSeparate = 0; gl.BlendFuncSeparateEXT = 0; +void +apple_nvidia_bug (int enable) + char * gl_vendor () CODE: @@ -3026,6 +3038,8 @@ CODE: gl_BlendFuncSeparate (sa, da, saa, daa); +void glBlendEquation (int se) + void glDepthMask (int flag) void glLogicOp (int opcode)