glVertexAttribPointer is throwing GL_INVALID_ENUM

I have written a program that draws a VBO on to the screen. In OpenGL 3.1 everything works fine and the VBO is drawn to the screen, but in OpenGL 3.2+ the VBO is not drawn to the screen.

After quite a bit of debugging i have found that everything seems to be fine until my program gets to this line of code:

glVertexAttribPointer(in_positionLoc, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), reinterpret_cast<void*>(offsetof(Vertex, pos)));

Which in OpenGL 3.2+ throws error 1282(GL_INVALID_ENUM)

This would suggest that glVertexAttribPointer was made to not accept GL_FLOAT in 3.2, but after hours of googling i have not found any evidence of this or any possible work around.

1282 (0x0502) is GL_INVALID_OPERATION. 1280 (0x0500) is GL_INVALID_ENUM.

Yes, I suspected I had got that wrong, which is why I put in the raw number I was getting, that makes a lot more sense now.

Thank you