--- deliantra/Deliantra-Client/DC.pm 2006/05/17 15:18:57 1.52 +++ deliantra/Deliantra-Client/DC.pm 2006/05/21 00:02:00 1.57 @@ -43,6 +43,7 @@ glShadeModel GL_FLAT; glDisable GL_DITHER; glDisable GL_DEPTH_TEST; + glDepthMask 0; glHint GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST; CFClient::Texture::restore_state (); @@ -52,7 +53,7 @@ return unless $GL_DEBUG; if (my $error = glGetError) { - Carp::cluck sprintf "opengl error %x while %s", $error, sprintf @_; + Carp::cluck sprintf "opengl error %x while %s", $error, &sprintf(@_); } } @@ -157,6 +158,13 @@ . $_[1]->content->present ($_[0]) } +sub view_verbatim { + (join "", + map +("\t" x ($indent / 2)) . "$_\n", + split /\n/, CFClient::UI::Label::escape ($_[1])) + . "\n" +} + sub view_textblock { ("\t" x ($indent / 2)) . "$_[1]\n\n" } @@ -350,7 +358,7 @@ if (defined $data) { glTexImage2D GL_TEXTURE_2D, 0, $self->{internalformat}, - $tw, $th, # need to pad texture first + $tw, $th, 0, $self->{format}, $self->{type}, @@ -366,6 +374,8 @@ CFClient::gl_check "copying to texture %dx%d if=%x", $tw, $th, $self->{internalformat}; } + + glBindTexture GL_TEXTURE_2D, 0; # just to be on the safe side } sub DESTROY { @@ -377,10 +387,10 @@ if $self->{name}; } -sub restore_state{ +sub restore_state { $_->upload for values %TEXTURES; -}; +} 1;