diff options
| author | sanine <sanine.not@pm.me> | 2022-08-21 18:49:49 -0500 | 
|---|---|---|
| committer | sanine <sanine.not@pm.me> | 2022-08-21 18:49:49 -0500 | 
| commit | bd5ae222cc1d2a24b55bd8aa8c72dd63f73cb35f (patch) | |
| tree | c1e6f2037050f0c78b89d84f2c447a027dfd2b6f | |
| parent | 8b9b325b092b7157996cfbcdd7ce38f9e876fff8 (diff) | |
use full gl_vertex_attrib_pointer
| -rw-r--r-- | src/gl/gl.c | 10 | 
1 files 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;  }  | 
