So I know how to provide input to a shader as an array:
GLuint vertexbuffer;
glGenBuffers(1, &vertexbuffer);
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(g_vertex_buffer_data), g_vertex_buffer_data, GL_STATIC_DRAW);
//inside loop, provide the shader a layout location
glEnableVertexAttribArray(0);
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
How would I provide a float as an input? I've tried Googling all over the place but there aren't very many good resources documenting shaders (for beginners at least). Furthermore, how do I use that input? Is it just like:
layout(location = 0) in vec3 vertPosition //for my position
layout(location = 1/*or whatever i use*/) in float rotation
//rest of the code....