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

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.129 by root, Tue Apr 18 01:36:13 2006 UTC vs.
Revision 1.131 by root, Tue Apr 18 02:04:23 2006 UTC

1494 my $h1 = $self->{h} - $ycut * $self->{h}; 1494 my $h1 = $self->{h} - $ycut * $self->{h};
1495 my $h2 = $ycut * $self->{h}; 1495 my $h2 = $ycut * $self->{h};
1496 1496
1497 my $yp = 0; 1497 my $yp = 0;
1498 1498
1499 glBindTexture (GL_TEXTURE_2D, $t1->{name}); 1499 glBindTexture GL_TEXTURE_2D, $t1->{name};
1500 glBegin (GL_QUADS); 1500 glBegin GL_QUADS;
1501 glTexCoord (0, 0); glVertex (0 , $yp); 1501 glTexCoord 0 , 0; glVertex 0 , $yp;
1502 glTexCoord (0, (1 - $ycut)); glVertex (0 , $yp + $h1); 1502 glTexCoord 0 , $t1->{t} * (1 - $ycut); glVertex 0 , $yp + $h1;
1503 glTexCoord (1, (1 - $ycut)); glVertex (0 + $w, $yp + $h1); 1503 glTexCoord $t1->{s}, $t1->{t} * (1 - $ycut); glVertex 0 + $w, $yp + $h1;
1504 glTexCoord (1, 0); glVertex (0 + $w, $yp); 1504 glTexCoord $t1->{s}, 0; glVertex 0 + $w, $yp;
1505 glEnd (); 1505 glEnd;
1506 1506
1507 $yp += $h1; 1507 $yp += $h1;
1508 1508
1509 glBindTexture (GL_TEXTURE_2D, $t2->{name}); 1509 glBindTexture GL_TEXTURE_2D, $t2->{name};
1510 glBegin (GL_QUADS); 1510 glBegin GL_QUADS;
1511 glTexCoord (0, (1 - $ycut)); glVertex (0 , $yp); 1511 glTexCoord 0 , $t2->{t} * (1 - $ycut); glVertex 0 , $yp;
1512 glTexCoord (0, 1); glVertex (0 , $yp + $h2); 1512 glTexCoord 0 , $t2->{t}; glVertex 0 , $yp + $h2;
1513 glTexCoord (1, 1); glVertex (0 + $w, $yp + $h2); 1513 glTexCoord $t2->{s}, $t2->{t}; glVertex 0 + $w, $yp + $h2;
1514 glTexCoord (1, (1 - $ycut)); glVertex (0 + $w, $yp); 1514 glTexCoord $t2->{s}, $t2->{t} * (1 - $ycut); glVertex 0 + $w, $yp;
1515 glEnd (); 1515 glEnd;
1516 1516
1517 glDisable GL_BLEND; 1517 glDisable GL_BLEND;
1518 glDisable GL_TEXTURE_2D; 1518 glDisable GL_TEXTURE_2D;
1519} 1519}
1520 1520
1964 $self->{mapmap_texture} = 1964 $self->{mapmap_texture} =
1965 new CFClient::Texture 1965 new CFClient::Texture
1966 w => $w, 1966 w => $w,
1967 h => $h, 1967 h => $h,
1968 data => $::MAP->mapmap ($w, $h), 1968 data => $::MAP->mapmap ($w, $h),
1969 type => GL_UNSIGNED_INT_8_8_8_8_REV; 1969 type => $CFClient::GL_VERSION >= 1.2 ? GL_UNSIGNED_INT_8_8_8_8_REV : GL_UNSIGNED_BYTE;
1970 1970
1971 $self->{mapmap_texture}->draw_quad (100, 100); 1971 $self->{mapmap_texture}->draw_quad (100, 100);
1972 1972
1973 glDisable GL_TEXTURE_2D; 1973 glDisable GL_TEXTURE_2D;
1974 glDisable GL_BLEND; 1974 glDisable GL_BLEND;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines