openglbook-samples
openglbook-samples copied to clipboard
Chapter 2 : warning treated as error that messes with the triangle using custom data structs
Basically,you've used size_t to cache the sizeof values but glVertexAttribPointer needs GLsizei which means a downcast meaning possible loss of data.So we get this "warning C4267: 'function' : conversion from 'size_t' to 'GLsizei', possible loss of data" warning which can also mess up the drawing of the triangle since it might try to use a faulty size for reading the verts.