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.97 by root, Fri May 26 18:28:23 2006 UTC vs.
Revision 1.98 by root, Mon May 29 02:01:56 2006 UTC

967{ 967{
968 HV *hv = (HV *)SvRV (self); 968 HV *hv = (HV *)SvRV (self);
969 float s = SvNV (*hv_fetch (hv, "s", 1, 1)); 969 float s = SvNV (*hv_fetch (hv, "s", 1, 1));
970 float t = SvNV (*hv_fetch (hv, "t", 1, 1)); 970 float t = SvNV (*hv_fetch (hv, "t", 1, 1));
971 int name = SvIV (*hv_fetch (hv, "name", 4, 1)); 971 int name = SvIV (*hv_fetch (hv, "name", 4, 1));
972 int wrap_mode = SvIV (*hv_fetch (hv, "wrap_mode", 9, 1));
973 972
974 if (items < 5) 973 if (items < 5)
975 { 974 {
976 w = SvNV (*hv_fetch (hv, "w", 1, 1)); 975 w = SvNV (*hv_fetch (hv, "w", 1, 1));
977 h = SvNV (*hv_fetch (hv, "h", 1, 1)); 976 h = SvNV (*hv_fetch (hv, "h", 1, 1));
984 glEnable (GL_ALPHA_TEST); 983 glEnable (GL_ALPHA_TEST);
985 glAlphaFunc (GL_GREATER, 0.01f); 984 glAlphaFunc (GL_GREATER, 0.01f);
986 } 985 }
987 986
988 glBindTexture (GL_TEXTURE_2D, name); 987 glBindTexture (GL_TEXTURE_2D, name);
989
990 if (wrap_mode)
991 {
992 glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
993 glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
994 }
995 988
996 glBegin (GL_QUADS); 989 glBegin (GL_QUADS);
997 glTexCoord2f (0, 0); glVertex2f (x , y ); 990 glTexCoord2f (0, 0); glVertex2f (x , y );
998 glTexCoord2f (0, t); glVertex2f (x , y + h); 991 glTexCoord2f (0, t); glVertex2f (x , y + h);
999 glTexCoord2f (s, t); glVertex2f (x + w, y + h); 992 glTexCoord2f (s, t); glVertex2f (x + w, y + h);
1562 const_iv (GL_TEXTURE_MAG_FILTER), 1555 const_iv (GL_TEXTURE_MAG_FILTER),
1563 const_iv (GL_TEXTURE_MIN_FILTER), 1556 const_iv (GL_TEXTURE_MIN_FILTER),
1564 const_iv (GL_TEXTURE_ENV_MODE), 1557 const_iv (GL_TEXTURE_ENV_MODE),
1565 const_iv (GL_TEXTURE_WRAP_S), 1558 const_iv (GL_TEXTURE_WRAP_S),
1566 const_iv (GL_TEXTURE_WRAP_T), 1559 const_iv (GL_TEXTURE_WRAP_T),
1560 const_iv (GL_REPEAT),
1567 const_iv (GL_CLAMP), 1561 const_iv (GL_CLAMP),
1568 const_iv (GL_REPEAT), 1562 const_iv (GL_CLAMP_TO_EDGE),
1569 const_iv (GL_NEAREST), 1563 const_iv (GL_NEAREST),
1570 const_iv (GL_LINEAR), 1564 const_iv (GL_LINEAR),
1571 const_iv (GL_NEAREST_MIPMAP_NEAREST), 1565 const_iv (GL_NEAREST_MIPMAP_NEAREST),
1572 const_iv (GL_LINEAR_MIPMAP_NEAREST), 1566 const_iv (GL_LINEAR_MIPMAP_NEAREST),
1573 const_iv (GL_NEAREST_MIPMAP_LINEAR), 1567 const_iv (GL_NEAREST_MIPMAP_LINEAR),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines