From bd5ae222cc1d2a24b55bd8aa8c72dd63f73cb35f Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 21 Aug 2022 18:49:49 -0500 Subject: use full gl_vertex_attrib_pointer --- src/gl/gl.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gl/gl.c b/src/gl/gl.c index 581cf39..f9419e2 100644 --- a/src/gl/gl.c +++ b/src/gl/gl.c @@ -196,13 +196,9 @@ int gl_buffer_data(lua_State *L) hs_throw_error(L, "all table items must be numbers (failed at index %d)", i); } buf[i] = lua_tonumber(L, -1); - printf(" [%d] %f\n", i, buf[i]); lua_pop(L, 1); } - printf("target: %d\n", target); - printf("GL_ARRAY_BUFFER: %d\n", GL_ARRAY_BUFFER); - /* call */ glBufferData(target, len*sizeof(float), buf, usage); free(buf); @@ -318,11 +314,9 @@ int gl_vertex_attrib_pointer(lua_State *L) lua_Integer index, size, stride, offset; bool normalized; hs_parse_args(L, hs_int(index), hs_int(size), hs_bool(normalized), hs_int(stride), hs_int(offset)); - printf("normalized: %d\n", normalized); - /*glVertexAttribPointer(index, size, GL_FLOAT, + glVertexAttribPointer(index, size, GL_FLOAT, normalized, stride*sizeof(float), - (void*) (offset*sizeof(float)));*/ - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), (void*)0); + (void*) (offset*sizeof(float))); return 0; } -- cgit v1.2.1