--- deliantra/Deliantra-Client/Client.xs 2009/11/04 14:40:51 1.290 +++ deliantra/Deliantra-Client/Client.xs 2009/12/17 02:49:38 1.293 @@ -1660,6 +1660,35 @@ } } +void +draw_fow_texture (float intensity, int name1, float s1, float t1, float w1, float h1) + PROTOTYPE: @ + CODE: +{ + glEnable (GL_TEXTURE_2D); + glEnable (GL_BLEND); + glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + + glColor4f (intensity, intensity, intensity, 0.9); + glPushMatrix (); + glScalef (1./3, 1./3, 1.); + + glBindTexture (GL_TEXTURE_2D, name1); + + glBegin (GL_QUADS); + glTexCoord2f ( 0, 0); glVertex2f ( 0, 0); + glTexCoord2f ( 0, t1); glVertex2f ( 0, h1); + glTexCoord2f (s1, t1); glVertex2f (w1, h1); + glTexCoord2f (s1, 0); glVertex2f (w1, 0); + glEnd (); + + glPopMatrix (); + + glDisable (GL_TEXTURE_2D); + glDisable (GL_BLEND); +} + IV texture_valid_2d (GLint internalformat, GLsizei w, GLsizei h, GLenum format, GLenum type) CODE: { @@ -2860,6 +2889,7 @@ const_iv (GL_VENDOR), const_iv (GL_VERSION), const_iv (GL_EXTENSIONS), + const_iv (GL_MAX_TEXTURE_UNITS), const_iv (GL_COLOR_MATERIAL), const_iv (GL_SMOOTH), const_iv (GL_FLAT), @@ -2881,6 +2911,10 @@ const_iv (GL_DST_ALPHA), const_iv (GL_ONE_MINUS_SRC_ALPHA), const_iv (GL_ONE_MINUS_DST_ALPHA), + const_iv (GL_SRC_COLOR), + const_iv (GL_DST_COLOR), + const_iv (GL_ONE_MINUS_SRC_COLOR), + const_iv (GL_ONE_MINUS_DST_COLOR), const_iv (GL_SRC_ALPHA_SATURATE), const_iv (GL_RGB), const_iv (GL_RGBA), @@ -2958,6 +2992,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 }; @@ -2974,6 +3011,9 @@ gl.BlendFuncSeparate = 0; gl.BlendFuncSeparateEXT = 0; +void +apple_nvidia_bug (int enable) + char * gl_vendor () CODE: @@ -3032,6 +3072,8 @@ CODE: gl_BlendFuncSeparate (sa, da, saa, daa); +# void glBlendEquation (int se) + void glDepthMask (int flag) void glLogicOp (int opcode)