add buttonDrawObject and calls to successfully draw button

This commit is contained in:
2024-07-31 08:41:19 +01:00
parent b1b929e055
commit 5525725ef3
8 changed files with 98 additions and 11 deletions

View File

@@ -58,8 +58,8 @@ void deleteShader(unsigned int shader) {
glDeleteShader(shader);
}
void vertexAttribPointer(int location, int numVecComponents) {
glVertexAttribPointer(location, numVecComponents, GL_FLOAT, GL_FALSE, numVecComponents * sizeof(float), (void*) 0);
void vertexAttribPointer(int location, int numVecComponents, int stride, int offset) {
glVertexAttribPointer(location, numVecComponents, GL_FLOAT, GL_FALSE, stride * sizeof(float), (void*)offset);
}
void enableVertexAttribArray(int location) {