--- deliantra/Deliantra-Client/DC/UI.pm 2006/04/25 11:18:49 1.174 +++ deliantra/Deliantra-Client/DC/UI.pm 2006/04/25 11:48:31 1.175 @@ -671,6 +671,13 @@ glClearColor 0, 0, 0, 0; glClear GL_COLOR_BUFFER_BIT; $self->child->draw; +# glColorMask 1, 1, 1, 0; +# glEnable GL_BLEND; +# glBlendFunc GL_SRC_ALPHA, GL_ZERO; +# glRasterPos 0, 0; +# glCopyPixels 0, 0, $self->{w}, $self->{h}; +# glDisable GL_BLEND; +# glColorMask 1, 1, 1, 1; }; } @@ -2162,7 +2169,7 @@ } $self->{texture} ||= new_from_opengl CFClient::Texture $self->{w}, $self->{h}, sub { - glClearColor 0, 0, 0, 1; + glClearColor 0, 0, 0, 0; glClear GL_COLOR_BUFFER_BIT; glEnable GL_BLEND; @@ -2205,11 +2212,14 @@ my ($self) = @_; if ($self->{texture}) { + glEnable GL_BLEND; + glBlendFunc GL_ONE, GL_ONE_MINUS_SRC_ALPHA; glEnable GL_TEXTURE_2D; glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; glColor 1, 1, 1, 1; $self->{texture}->draw_quad (0, 0, $self->{w}, $self->{h}); glDisable GL_TEXTURE_2D; + glDisable GL_BLEND; } $self->{children}[1]->draw;