From: Brendan Hansen Date: Tue, 21 Dec 2021 01:51:42 +0000 (-0600) Subject: updated gl X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=1641cd9e5b2c9a228136cc97d10aea0822a4195e;p=onyx.git updated gl --- diff --git a/modules/opengles/module.onyx b/modules/opengles/module.onyx index c69df44d..5abeb749 100644 --- a/modules/opengles/module.onyx +++ b/modules/opengles/module.onyx @@ -14,9 +14,9 @@ GLGetProcAddress :: #distinct i64 // (name: cstr) -> ^void glAttachShader :: (program: GLuint, shader: GLuint) -> void --- glBindAttribLocation :: (program: GLuint, index: GLuint, name: ^GLchar) -> void --- glBindBuffer :: (target: GLenum, buffer: GLint) -> void --- - glBindFramebuffer :: (target: GLenum, framebuffer: GLuint) -> void --- - glBindRenderbuffer :: (target: GLenum, renderbuffer: GLuint) -> void --- - glBindTexture :: (target: GLenum, texture: GLuint) -> void --- + glBindFramebuffer :: (target: GLenum, framebuffer: GLint) -> void --- + glBindRenderbuffer :: (target: GLenum, renderbuffer: GLint) -> void --- + glBindTexture :: (target: GLenum, texture: GLint) -> void --- glBlendColor :: (red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat) -> void --- glBlendEquation :: (mode: GLenum) -> void --- glBlendEquationSeparate :: (modeRGB: GLenum, modeAlpha: GLenum) -> void --- diff --git a/modules/opengles/onyx_opengles.c b/modules/opengles/onyx_opengles.c index 1663b41a..175b19ca 100644 --- a/modules/opengles/onyx_opengles.c +++ b/modules/opengles/onyx_opengles.c @@ -130,6 +130,12 @@ return NULL; \ } +#define ONYX_GL_INT_PTR_RET_INT(name, ptr_type) \ + ONYX_DEF(name, (INT, PTR), (INT)) { \ + results->data[0] = WASM_I32_VAL(glad_##name (params->data[0].of.i32, (ptr_type *) ONYX_PTR(params->data[1].of.i32))); \ + return NULL; \ + } + #define ONYX_GL_INT_2_PTR(name, ptr_type) \ ONYX_DEF(name, (INT, INT, PTR), ()) { \ glad_##name (params->data[0].of.i32, params->data[1].of.i32, (ptr_type *) ONYX_PTR(params->data[2].of.i32)); \ @@ -173,19 +179,19 @@ } #define ONYX_GL_INT_8_PTR(name, ptr_type) \ - ONYX_DEF(name, (INT, INT, INT, INT, INT, INT, INT, PTR), ()) { \ + ONYX_DEF(name, (INT, INT, INT, INT, INT, INT, INT, INT, PTR), ()) { \ glad_##name (params->data[0].of.i32, params->data[1].of.i32, params->data[2].of.i32, params->data[3].of.i32, params->data[4].of.i32, params->data[5].of.i32, params->data[6].of.i32, params->data[7].of.i32, (ptr_type *) ONYX_PTR(params->data[8].of.i32)); \ return NULL; \ } #define ONYX_GL_INT_9_PTR(name, ptr_type) \ - ONYX_DEF(name, (INT, INT, INT, INT, INT, INT, INT, INT, PTR), ()) { \ + ONYX_DEF(name, (INT, INT, INT, INT, INT, INT, INT, INT, INT, PTR), ()) { \ glad_##name (params->data[0].of.i32, params->data[1].of.i32, params->data[2].of.i32, params->data[3].of.i32, params->data[4].of.i32, params->data[5].of.i32, params->data[6].of.i32, params->data[7].of.i32, params->data[8].of.i32, (ptr_type *) ONYX_PTR(params->data[9].of.i32)); \ return NULL; \ } #define ONYX_GL_INT_10_PTR(name, ptr_type) \ - ONYX_DEF(name, (INT, INT, INT, INT, INT, INT, INT, INT, INT, PTR), ()) { \ + ONYX_DEF(name, (INT, INT, INT, INT, INT, INT, INT, INT, INT, INT, PTR), ()) { \ glad_##name (params->data[0].of.i32, params->data[1].of.i32, params->data[2].of.i32, params->data[3].of.i32, params->data[4].of.i32, params->data[5].of.i32, params->data[6].of.i32, params->data[7].of.i32, params->data[8].of.i32, params->data[9].of.i32, (ptr_type *) ONYX_PTR(params->data[10].of.i32)); \ return NULL; \ } @@ -359,7 +365,7 @@ ONYX_GL_INT_PTR(glGetAttribLocation, char) ONYX_GL_INT_PTR(glGetBooleanv, GLboolean) ONYX_GL_INT_PTR(glGetFloatv, GLfloat) ONYX_GL_INT_PTR(glGetIntegerv, GLint) -ONYX_GL_INT_PTR(glGetUniformLocation, char) +ONYX_GL_INT_PTR_RET_INT(glGetUniformLocation, char) ONYX_GL_INT_PTR(glVertexAttrib1fv, GLfloat) ONYX_GL_INT_PTR(glVertexAttrib2fv, GLfloat) ONYX_GL_INT_PTR(glVertexAttrib3fv, GLfloat) diff --git a/modules/opengles/onyx_opengles.so b/modules/opengles/onyx_opengles.so index 71591b09..393e39ff 100755 Binary files a/modules/opengles/onyx_opengles.so and b/modules/opengles/onyx_opengles.so differ