… | |
… | |
115 | 0.05, 0.13, 0.05, |
115 | 0.05, 0.13, 0.05, |
116 | ); |
116 | ); |
117 | glEnable GL_CONVOLUTION_2D; |
117 | glEnable GL_CONVOLUTION_2D; |
118 | } |
118 | } |
119 | |
119 | |
|
|
120 | $self->{fow_texture_name} ||= glGenTexture; |
120 | # try to re-use the texture name: TODO improve texture class instead |
121 | # try to re-use the texture name: TODO improve texture class instead |
121 | my $prev_name = ((delete $self->{fow_texture}) || {})->{name}; |
|
|
122 | |
122 | |
123 | $self->{fow_texture} = new CFClient::Texture |
123 | $self->{fow_texture} = new CFClient::Texture |
124 | w => $w, |
124 | w => $w, |
125 | h => $h, |
125 | h => $h, |
126 | data => $data, |
126 | data => $data, |
127 | name => $prev_name, # a bit hackish |
127 | name => $self->{fow_texture_name}, |
128 | internalformat => GL_ALPHA, |
128 | internalformat => GL_ALPHA, |
129 | format => GL_ALPHA; |
129 | format => GL_ALPHA; |
130 | |
130 | |
131 | glDisable GL_CONVOLUTION_2D if $::CFG->{fow_smooth}; |
131 | glDisable GL_CONVOLUTION_2D if $::CFG->{fow_smooth}; |
132 | |
132 | |