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.35 by root, Fri Apr 14 02:03:10 2006 UTC vs.
Revision 1.36 by elmex, Fri Apr 14 11:32:21 2006 UTC

399{ 399{
400 HV *hv = (HV *)SvRV (self); 400 HV *hv = (HV *)SvRV (self);
401 double s = SvNV (*hv_fetch (hv, "s", 1, 1)); 401 double s = SvNV (*hv_fetch (hv, "s", 1, 1));
402 double t = SvNV (*hv_fetch (hv, "t", 1, 1)); 402 double t = SvNV (*hv_fetch (hv, "t", 1, 1));
403 int name = SvIV (*hv_fetch (hv, "name", 4, 1)); 403 int name = SvIV (*hv_fetch (hv, "name", 4, 1));
404 int wrap_mode = SvIV (*hv_fetch (hv, "wrap_mode", 9, 1));
404 405
405 if (items < 5) 406 if (items < 5)
406 { 407 {
407 w = SvNV (*hv_fetch (hv, "w", 1, 1)); 408 w = SvNV (*hv_fetch (hv, "w", 1, 1));
408 h = SvNV (*hv_fetch (hv, "h", 1, 1)); 409 h = SvNV (*hv_fetch (hv, "h", 1, 1));
409 } 410 }
410 411
411 glBindTexture (GL_TEXTURE_2D, name); 412 glBindTexture (GL_TEXTURE_2D, name);
413 if (wrap_mode) {
414 glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
415 glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
416 }
412 glBegin (GL_QUADS); 417 glBegin (GL_QUADS);
413 glTexCoord2d (0, 0); glVertex2d (x , y ); 418 glTexCoord2d (0, 0); glVertex2d (x , y );
414 glTexCoord2d (0, t); glVertex2d (x , y + h); 419 glTexCoord2d (0, t); glVertex2d (x , y + h);
415 glTexCoord2d (s, t); glVertex2d (x + w, y + h); 420 glTexCoord2d (s, t); glVertex2d (x + w, y + h);
416 glTexCoord2d (s, 0); glVertex2d (x + w, y ); 421 glTexCoord2d (s, 0); glVertex2d (x + w, y );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines