In a shader I want to pass an array of primitives into it as a vertex attribute.
In the shader I declare
in float FloatItems[8]
in int IntItems[8]
IN the C++ code uses:
void glGetActiveAttrib( GLuint program,
GLuint index,
GLsizei bufSize,
GLsizei *length,
GLint *size,
GLenum *type,
GLchar *name);
returns
name == "FloatItems[0]"
size == 1
type == 0x1406 (GL_FLOAT) - GL_INT for the int one.
when I try glVertexAttribPointer with the location to bind to it it fails with 0x0501 "invalid value"
Apparently gls is creating a single attribute with a name of "FloatItem[0]" instead of an array FloatItem with a size of 8 elements.
Is there a "proper" way to do this ??