ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.292 by root, Fri Dec 4 15:04:56 2009 UTC vs.
Revision 1.293 by root, Thu Dec 17 02:49:38 2009 UTC

1658 glDisable (GL_ALPHA_TEST); 1658 glDisable (GL_ALPHA_TEST);
1659 glDisable (GL_BLEND); 1659 glDisable (GL_BLEND);
1660 } 1660 }
1661} 1661}
1662 1662
1663void
1664draw_fow_texture (float intensity, int name1, float s1, float t1, float w1, float h1)
1665 PROTOTYPE: @
1666 CODE:
1667{
1668 glEnable (GL_TEXTURE_2D);
1669 glEnable (GL_BLEND);
1670 glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
1671 glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
1672
1673 glColor4f (intensity, intensity, intensity, 0.9);
1674 glPushMatrix ();
1675 glScalef (1./3, 1./3, 1.);
1676
1677 glBindTexture (GL_TEXTURE_2D, name1);
1678
1679 glBegin (GL_QUADS);
1680 glTexCoord2f ( 0, 0); glVertex2f ( 0, 0);
1681 glTexCoord2f ( 0, t1); glVertex2f ( 0, h1);
1682 glTexCoord2f (s1, t1); glVertex2f (w1, h1);
1683 glTexCoord2f (s1, 0); glVertex2f (w1, 0);
1684 glEnd ();
1685
1686 glPopMatrix ();
1687
1688 glDisable (GL_TEXTURE_2D);
1689 glDisable (GL_BLEND);
1690}
1691
1663IV texture_valid_2d (GLint internalformat, GLsizei w, GLsizei h, GLenum format, GLenum type) 1692IV texture_valid_2d (GLint internalformat, GLsizei w, GLsizei h, GLenum format, GLenum type)
1664 CODE: 1693 CODE:
1665{ 1694{
1666 GLint width; 1695 GLint width;
1667 glTexImage2D (GL_PROXY_TEXTURE_2D, 0, internalformat, w, h, 0, format, type, 0); 1696 glTexImage2D (GL_PROXY_TEXTURE_2D, 0, internalformat, w, h, 0, format, type, 0);
2858 } *civ, const_iv[] = { 2887 } *civ, const_iv[] = {
2859# define const_iv(name) { # name, (IV)name } 2888# define const_iv(name) { # name, (IV)name }
2860 const_iv (GL_VENDOR), 2889 const_iv (GL_VENDOR),
2861 const_iv (GL_VERSION), 2890 const_iv (GL_VERSION),
2862 const_iv (GL_EXTENSIONS), 2891 const_iv (GL_EXTENSIONS),
2892 const_iv (GL_MAX_TEXTURE_UNITS),
2863 const_iv (GL_COLOR_MATERIAL), 2893 const_iv (GL_COLOR_MATERIAL),
2864 const_iv (GL_SMOOTH), 2894 const_iv (GL_SMOOTH),
2865 const_iv (GL_FLAT), 2895 const_iv (GL_FLAT),
2866 const_iv (GL_DITHER), 2896 const_iv (GL_DITHER),
2867 const_iv (GL_BLEND), 2897 const_iv (GL_BLEND),
2879 const_iv (GL_ZERO), 2909 const_iv (GL_ZERO),
2880 const_iv (GL_SRC_ALPHA), 2910 const_iv (GL_SRC_ALPHA),
2881 const_iv (GL_DST_ALPHA), 2911 const_iv (GL_DST_ALPHA),
2882 const_iv (GL_ONE_MINUS_SRC_ALPHA), 2912 const_iv (GL_ONE_MINUS_SRC_ALPHA),
2883 const_iv (GL_ONE_MINUS_DST_ALPHA), 2913 const_iv (GL_ONE_MINUS_DST_ALPHA),
2914 const_iv (GL_SRC_COLOR),
2915 const_iv (GL_DST_COLOR),
2916 const_iv (GL_ONE_MINUS_SRC_COLOR),
2917 const_iv (GL_ONE_MINUS_DST_COLOR),
2884 const_iv (GL_SRC_ALPHA_SATURATE), 2918 const_iv (GL_SRC_ALPHA_SATURATE),
2885 const_iv (GL_RGB), 2919 const_iv (GL_RGB),
2886 const_iv (GL_RGBA), 2920 const_iv (GL_RGBA),
2887 const_iv (GL_RGBA4), 2921 const_iv (GL_RGBA4),
2888 const_iv (GL_RGBA8), 2922 const_iv (GL_RGBA8),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines