summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-08-28 23:05:29 -0700
committerKristian Høgsberg <krh@bitplanet.net>2013-08-28 23:08:25 -0700
commit6048a357e2fb282a7460f01bd8d8ef90e2bbf7d9 (patch)
treee592ca6f94734c78182457fa421c091480f1649e
parent00ff1e1c473ea8fabf8f459c4bd32a73afb50916 (diff)
downloadweston-6048a357e2fb282a7460f01bd8d8ef90e2bbf7d9.tar.gz
weston-6048a357e2fb282a7460f01bd8d8ef90e2bbf7d9.tar.bz2
weston-6048a357e2fb282a7460f01bd8d8ef90e2bbf7d9.zip
gl-renderer: Use GL_UNSIGNED_SHORT for index array type
GL_UNSIGNED_INT is only supported when GL_OES_element_index_uint is available (mesa implements that extension). We don't need 32-bit indices, so just use GL_UNSIGNED_SHORT.
-rw-r--r--src/gl-renderer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index 54da534f..f43e9545 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -856,7 +856,7 @@ texture_border(struct weston_output *output)
struct weston_compositor *ec = output->compositor;
struct gl_renderer *gr = get_renderer(ec);
GLfloat *d;
- unsigned int *p;
+ unsigned short *p;
int i, j, k, n;
GLfloat x[4], y[4], u[4], v[4];
@@ -956,7 +956,7 @@ draw_border(struct weston_output *output)
glEnableVertexAttribArray(1);
glDrawElements(GL_TRIANGLES, n * 6,
- GL_UNSIGNED_INT, gr->indices.data);
+ GL_UNSIGNED_SHORT, gr->indices.data);
glDisableVertexAttribArray(1);
glDisableVertexAttribArray(0);