mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 13:28:07 +02:00
gl-renderer: Assume fixed wireframe tex unit
The wireframe unit can only be used by the wireframe texture so there's no need to bind it anymore before use. Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
parent
69d4f66fab
commit
b755345a46
2 changed files with 2 additions and 5 deletions
|
|
@ -1812,6 +1812,7 @@ update_wireframe_tex(struct gl_renderer *gr,
|
|||
if (new_size <= gr->wireframe_size)
|
||||
return;
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + TEX_UNIT_WIREFRAME);
|
||||
if (gr->wireframe_size == 0) {
|
||||
glGenTextures(1, &gr->wireframe_tex);
|
||||
glBindTexture(GL_TEXTURE_2D, gr->wireframe_tex);
|
||||
|
|
|
|||
|
|
@ -765,12 +765,8 @@ gl_shader_load_config(struct gl_shader *shader,
|
|||
break;
|
||||
}
|
||||
|
||||
if (sconf->req.wireframe) {
|
||||
assert(sconf->wireframe_tex != 0);
|
||||
if (sconf->req.wireframe)
|
||||
glUniform1i(shader->tex_uniform_wireframe, TEX_UNIT_WIREFRAME);
|
||||
glActiveTexture(GL_TEXTURE0 + TEX_UNIT_WIREFRAME);
|
||||
glBindTexture(GL_TEXTURE_2D, sconf->wireframe_tex);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue