Original Post
Ok, here is my situation: I, like most people I assume, have defined a class for representing a 3D point, called Point3D. It only contains 3 float variables, and has a bunch of member functions for working with vectors, like normalization, dot product, etc. etc.
I have an object (terrain) represented by a large array of these points, and I want to use a vertex array to handle the data. I call glVertexPointer telling it to use float values, and I give the address of my Point3D array. The array is just a bunch of sequential floating point values, so I don''t make an explicit (GLfloat*) cast. I then call glDrawArrays with no problems.
I just wanted to double check here and make sure that I am not paying any kind of penalties by doing this (meaning, is it performing an implicit cast every time I call glDrawArrays?) Or, if there is something wrong with my assumption about being able to pass the Point3D array without a cast, I would like to know.
Don''t know why I never thought of this before, but better late than never
Thanks