render/gles2: unbind textures after use
Keeping textures bound results in hard-to-debug situations where some GL
operations incorrectly affect the texture.
Simon Ser authored 4 years ago
Drew DeVault committed 4 years ago
78 | 78 |
glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
|
79 | 79 |
glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
|
80 | 80 |
|
|
81 |
glBindTexture(GL_TEXTURE_2D, 0);
|
|
82 |
|
81 | 83 |
POP_GLES2_DEBUG;
|
82 | 84 |
return true;
|
83 | 85 |
}
|
|
175 | 177 |
glTexImage2D(GL_TEXTURE_2D, 0, fmt->gl_format, width, height, 0,
|
176 | 178 |
fmt->gl_format, fmt->gl_type, data);
|
177 | 179 |
glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, 0);
|
|
180 |
|
|
181 |
glBindTexture(GL_TEXTURE_2D, 0);
|
178 | 182 |
|
179 | 183 |
POP_GLES2_DEBUG;
|
180 | 184 |
return &texture->wlr_texture;
|
|
230 | 234 |
glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture->tex);
|
231 | 235 |
gles2_procs.glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES,
|
232 | 236 |
texture->image);
|
|
237 |
glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
|
233 | 238 |
|
234 | 239 |
POP_GLES2_DEBUG;
|
235 | 240 |
return &texture->wlr_texture;
|
|
291 | 296 |
glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture->tex);
|
292 | 297 |
gles2_procs.glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES,
|
293 | 298 |
texture->image);
|
|
299 |
glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
|
294 | 300 |
|
295 | 301 |
POP_GLES2_DEBUG;
|
296 | 302 |
return &texture->wlr_texture;
|