In OpenGL (in particular, ES 2.0 in this case), what happens if I pass 2 components to the top, for example:
glVertexAttribPointer( 0, 2, GL_FLOAT, GL_FALSE, sizeof( MyVertexStruct ), pPos );
... but the shader expects three?
It seems that the third (Z, in this case) component is 0, which I want, but I hesitate to rely on behavior. Is it defined somewhere in the OpenGL, ES or GLSL standards?
(My search-fu does not allow me: to find nothing in the red book, the purple book, or on the khronos.org man pages, but I may have simply not paid attention to it.)
source
share