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.28 by root, Sun Apr 9 00:06:10 2006 UTC vs.
Revision 1.29 by root, Sun Apr 9 00:09:50 2006 UTC

148} 148}
149 149
150sub _draw { 150sub _draw {
151 my ($self) = @_; 151 my ($self) = @_;
152 152
153 my ($w, $h) = $self->size_request;#TODO# use widht/height of texture 153 my ($w, $h) = $self->size_request;#TODO# use width/height of texture
154
154 my $tex = $self->{texture} 155 my $tex = $self->{texture}
155 or return; 156 or return;
156 157
157 glEnable GL_BLEND; 158 glEnable GL_BLEND;
158 glEnable GL_TEXTURE_2D; 159 glEnable GL_TEXTURE_2D;
369 glEnable GL_BLEND; 370 glEnable GL_BLEND;
370 glEnable GL_TEXTURE_2D; 371 glEnable GL_TEXTURE_2D;
371 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE; 372 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE;
372 glBindTexture GL_TEXTURE_2D, $tex->{name}; 373 glBindTexture GL_TEXTURE_2D, $tex->{name};
373 374
374 glColor 1, 0, 1; 375 glColor 1, 1, 1, 0.8;
375 376
376 glBegin GL_QUADS; 377 glBegin GL_QUADS;
377 glTexCoord 0, 0; glVertex 0 , 0; 378 glTexCoord 0, 0; glVertex 0 , 0;
378 glTexCoord 0, 1; glVertex 0 , $tex->{height}; 379 glTexCoord 0, 1; glVertex 0 , $tex->{height};
379 glTexCoord 1, 1; glVertex $tex->{width}, $tex->{height}; 380 glTexCoord 1, 1; glVertex $tex->{width}, $tex->{height};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines