03-16-2018, 07:16 PM
These function calls give errors (section: add some code):
glVertexAttribPointer(p_state->user_data->positionLoc, 3, GL_FLOAT, GL_FALSE, 5*sizeof(GLfloat), RectVertices);
// Load the texture coordinate
glVertexAttribPointer(p_state->user_data->texCoordLoc, 2, GL_FLOAT, GL_FALSE, 5*sizeof(GLfloat), RectVertices[3]);
Severity Code Description Project File Line Suppression State
Error [Clang IntelliSense] Error: no matching function for call to 'glVertexAttribPointer' GameProject1 c:\openglesprojects\gameproject1\gameproject1\GameProject1.cpp 248
Severity Code Description Project File Line Suppression State
Error cannot convert 'GLfloat {aka float}' to 'const GLvoid* {aka const void*}' for argument '6' to 'void glVertexAttribPointer(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*)' GameProject1 C:\OpenGLESProjects\GameProject1\GameProject1\GameProject1.cpp 248
What is wrong?
Patrick
glVertexAttribPointer(p_state->user_data->positionLoc, 3, GL_FLOAT, GL_FALSE, 5*sizeof(GLfloat), RectVertices);
// Load the texture coordinate
glVertexAttribPointer(p_state->user_data->texCoordLoc, 2, GL_FLOAT, GL_FALSE, 5*sizeof(GLfloat), RectVertices[3]);
Severity Code Description Project File Line Suppression State
Error [Clang IntelliSense] Error: no matching function for call to 'glVertexAttribPointer' GameProject1 c:\openglesprojects\gameproject1\gameproject1\GameProject1.cpp 248
Severity Code Description Project File Line Suppression State
Error cannot convert 'GLfloat {aka float}' to 'const GLvoid* {aka const void*}' for argument '6' to 'void glVertexAttribPointer(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*)' GameProject1 C:\OpenGLESProjects\GameProject1\GameProject1\GameProject1.cpp 248
What is wrong?
Patrick