From 2bbe618778c7375095e783c4e607f7e7a0f417d2 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Thu, 16 Jun 2016 15:45:59 -0400 Subject: [PATCH] gl: fix build on OS X Also add missing switch cases which cause a compiler warning on OS X. They are unused so far. Fixes golang/go#16071 Change-Id: I5ced5a814a7abc956b0b0cdad211ecd69a54a95b Reviewed-on: https://go-review.googlesource.com/24177 Reviewed-by: Hyang-Ah Hana Kim --- gl/work.c | 12 ++++++++++++ gl/work.h | 1 + 2 files changed, 13 insertions(+) diff --git a/gl/work.c b/gl/work.c index 75e6a71..75380d0 100644 --- a/gl/work.c +++ b/gl/work.c @@ -416,6 +416,9 @@ uintptr_t processFn(struct fnargs* args, char* parg) { case glfnUniform1ui: glUniform1ui((GLint)args->a0, (GLuint)args->a1); break; + case glfnUniform1uiv: + glUniform1uiv((GLint)args->a0, (GLsizeiptr)args->a1, (GLuint*)parg); + break; case glfnUniform1iv: glUniform1iv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); break; @@ -431,6 +434,9 @@ uintptr_t processFn(struct fnargs* args, char* parg) { case glfnUniform2ui: glUniform2ui((GLint)args->a0, (GLuint)args->a1, (GLuint)args->a2); break; + case glfnUniform2uiv: + glUniform2uiv((GLint)args->a0, (GLsizeiptr)args->a1, (GLuint*)parg); + break; case glfnUniform2iv: glUniform2iv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); break; @@ -446,6 +452,9 @@ uintptr_t processFn(struct fnargs* args, char* parg) { case glfnUniform3ui: glUniform3ui((GLint)args->a0, (GLuint)args->a1, (GLuint)args->a2, (GLuint)args->a3); break; + case glfnUniform3uiv: + glUniform3uiv((GLint)args->a0, (GLsizeiptr)args->a1, (GLuint*)parg); + break; case glfnUniform3iv: glUniform3iv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); break; @@ -461,6 +470,9 @@ uintptr_t processFn(struct fnargs* args, char* parg) { case glfnUniform4ui: glUniform4ui((GLint)args->a0, (GLuint)args->a1, (GLuint)args->a2, (GLuint)args->a3, (GLuint)args->a4); break; + case glfnUniform4uiv: + glUniform4uiv((GLint)args->a0, (GLsizeiptr)args->a1, (GLuint*)parg); + break; case glfnUniform4iv: glUniform4iv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); break; diff --git a/gl/work.h b/gl/work.h index dc494ba..9ba29ca 100644 --- a/gl/work.h +++ b/gl/work.h @@ -18,6 +18,7 @@ #ifdef os_osx #include +#define GL_ES_VERSION_3_0 1 #endif #if defined(GL_ES_VERSION_3_0) && GL_ES_VERSION_3_0