--- deliantra/Deliantra-Client/Client.xs 2009/12/04 15:04:56 1.292 +++ 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),