render/gles2: use glGetAttribLocation instead of hardcoded indices

This commit is contained in:
Simon Zeni 2020-06-08 12:24:19 -04:00 committed by Simon Ser
parent d5530b26d7
commit 4a4da256dd
2 changed files with 72 additions and 39 deletions

View file

@ -38,6 +38,8 @@ struct wlr_gles2_tex_shader {
GLint invert_y;
GLint tex;
GLint alpha;
GLint pos_attrib;
GLint tex_attrib;
};
struct wlr_gles2_renderer {
@ -58,11 +60,14 @@ struct wlr_gles2_renderer {
GLuint program;
GLint proj;
GLint color;
GLint pos_attrib;
} quad;
struct {
GLuint program;
GLint proj;
GLint color;
GLint pos_attrib;
GLint tex_attrib;
} ellipse;
struct wlr_gles2_tex_shader tex_rgba;
struct wlr_gles2_tex_shader tex_rgbx;