I\'m trying to understand glVertexAttribPointer
, and I noticed that it accepts many more types than those that have an equivalent in GLSL. So to write down ever
No.
You cannot feed a VS int
, uint
, or double
input variable (or vectors of these) from a call to glVertexAttribPointer
. This function only feeds float
types. If you use non-normalized integers with this function, then they will be cast to floats as if by a standard cast operation (255 becomes 255.0f). GL_FIXED
is just another floating-point representation, where a 32-bit integer is treated as a 16.16 fixed-point value. Naturally, this will be converted to a floating-point number when fed to the VS.
To feed the VS integers, you must use glVertexAttribIPointer. To feed double
s, you must use glVertexAttribLPointer.
bool
types cannot be input variables of any kind.