openglbook-samples icon indicating copy to clipboard operation
openglbook-samples copied to clipboard

Chapter 2 : warning treated as error that messes with the triangle using custom data structs

Open NPatch opened this issue 10 years ago • 0 comments

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.

NPatch avatar Jan 17 '15 10:01 NPatch