… | |
… | |
122 | unless ($tw > 0 && $th > 0) { |
122 | unless ($tw > 0 && $th > 0) { |
123 | $tw = $th = 1; |
123 | $tw = $th = 1; |
124 | $data = "\x00" x 64; |
124 | $data = "\x00" x 64; |
125 | } |
125 | } |
126 | |
126 | |
127 | $self->{minified} = [CFClient::average $tw, $th, $data] |
127 | $self->{minified} ||= [CFClient::average $tw, $th, $data] |
128 | if $self->{minify}; |
128 | if $self->{minify}; |
129 | |
129 | |
130 | unless ($GL_NPOT) { |
130 | unless ($GL_NPOT) { |
131 | # TODO: does not work for zero-sized textures |
131 | # TODO: does not work for zero-sized textures |
132 | $tw = topot $tw; |
132 | $tw = topot $tw; |