--- deliantra/Deliantra-Client/Client.xs 2008/12/21 21:54:27 1.287 +++ deliantra/Deliantra-Client/Client.xs 2009/11/26 07:19:11 1.291 @@ -2018,7 +2018,7 @@ pl_tex.name = 0; - // thats current max. sorry. + // that's current max. sorry. if (sw > 255) sw = 255; if (sh > 255) sh = 255; @@ -2176,13 +2176,12 @@ rc_key_t key_ov = key; maptex tex = self->tex [TEXID_SPEECH]; rc_array_t *arr; + int px = x * T + T * 2 / 32; + int py = y * T - T * 6 / 32; key_ov.texname = tex.name; arr = rc_array (rc_ov, &key_ov); - int px = x * T + T * 2 / 32; - int py = y * T - T * 6 / 32; - rc_t2f_v3f (arr, 0 , 0 , px , py , 0); rc_t2f_v3f (arr, 0 , tex.t, px , py + T, 0); rc_t2f_v3f (arr, tex.s, tex.t, px + T, py + T, 0); @@ -2369,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); @@ -2386,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); @@ -2953,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 }; @@ -2969,6 +2977,9 @@ gl.BlendFuncSeparate = 0; gl.BlendFuncSeparateEXT = 0; +void +apple_nvidia_bug (int enable) + char * gl_vendor () CODE: @@ -3027,6 +3038,8 @@ CODE: gl_BlendFuncSeparate (sa, da, saa, daa); +void glBlendEquation (int se) + void glDepthMask (int flag) void glLogicOp (int opcode)