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.11 by elmex, Sat Apr 8 18:18:09 2006 UTC vs.
Revision 1.12 by root, Sat Apr 8 18:48:34 2006 UTC

139 139
140 if (exists $self->{data}) { 140 if (exists $self->{data}) {
141 $data = $self->{data}; 141 $data = $self->{data};
142 } elsif (exists $self->{rendercb}) { 142 } elsif (exists $self->{rendercb}) {
143 glViewport 0, 0, $self->{width}, $self->{height}; 143 glViewport 0, 0, $self->{width}, $self->{height};
144 glMatrixMode GL_PROJECTION;
145 glLoadIdentity;
146 glOrtho 0, $self->{width}, $self->{height}, 0, -100, 100;
147 glMatrixMode GL_MODELVIEW;
148 glPushmatrix;
149 glLoadIdentity;
144 glClear GL_COLOR_BUFFER_BIT; 150 glClear GL_COLOR_BUFFER_BIT;
145 151
146 $self->{rendercb}->($self, $self->{width}, $self->{height}); 152 $self->{rendercb}->($self, $self->{width}, $self->{height});
147 } else { 153 } else {
148 my $pb = new Gtk2::Gdk::PixbufLoader; 154 my $pb = new Gtk2::Gdk::PixbufLoader;
184 glCopyTexImage2D GL_TEXTURE_2D, 0, 190 glCopyTexImage2D GL_TEXTURE_2D, 0,
185 GL_RGBA8, 191 GL_RGBA8,
186 0, 0, 192 0, 0,
187 $self->{width}, $self->{height}, 193 $self->{width}, $self->{height},
188 0; 194 0;
195 glPopmatrix;
189 warn "ERR: ". (glGetError). "\n"; 196 warn "ERR: ". (glGetError). "\n";
197 sleep 1;
190 } 198 }
191} 199}
192 200
193sub DESTROY { 201sub DESTROY {
194 my ($self) = @_; 202 my ($self) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines