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

Comparing deliantra/Deliantra-Client/DC.pm (file contents):
Revision 1.8 by root, Sat Apr 8 13:36:25 2006 UTC vs.
Revision 1.11 by elmex, Sat Apr 8 18:18:09 2006 UTC

53 53
54 open CFG, ">$file" 54 open CFG, ">$file"
55 or return; 55 or return;
56 56
57 { 57 {
58 require Data::Dumper;
58 local $Data::Dumper::Purity = 1; 59 local $Data::Dumper::Purity = 1;
59 $::CFG->{VERSION} = $::VERSION; 60 $::CFG->{VERSION} = $::VERSION;
60 print CFG Data::Dumper->Dump ([$::CFG], [qw/CFG/]); 61 print CFG Data::Dumper->Dump ([$::CFG], [qw/CFG/]);
61 } 62 }
62 63
124} 125}
125 126
126sub new_from_opengl { 127sub new_from_opengl {
127 my ($class, $w, $h, $cb) = @_; 128 my ($class, $w, $h, $cb) = @_;
128 129
129 $class->_new (width => $w, height => $h, render => $cb) 130 $class->_new (width => $w, height => $h, rendercb => $cb)
130} 131}
131 132
132sub upload { 133sub upload {
133 my ($self) = @_; 134 my ($self) = @_;
134 135
173 0, 174 0,
174 GL_RGBA, 175 GL_RGBA,
175 GL_UNSIGNED_BYTE, 176 GL_UNSIGNED_BYTE,
176 $data; 177 $data;
177 } else { 178 } else {
179 warn "I{DTEDRAW TEX: $self->{width} $self->{height} \n";
180 warn "ERR: ". (glGetError). "\n";
181 my ($bd, $br) = (glGet (GL_DRAW_BUFFER), glGet (GL_READ_BUFFER));
182 warn "BUF:[$bd $br]\n";
183
178 glCopyTexImage2D GL_TEXTURE_2D, 0, 184 glCopyTexImage2D GL_TEXTURE_2D, 0,
179 GL_RGBA8, 185 GL_RGBA8,
180 0, 0, 186 0, 0,
181 $self->{width}, $self->{height}, 187 $self->{width}, $self->{height},
182 0; 188 0;
189 warn "ERR: ". (glGetError). "\n";
183 } 190 }
184} 191}
185 192
186sub DESTROY { 193sub DESTROY {
187 my ($self) = @_; 194 my ($self) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines