Problem using VBOs

Hello All,

I was mostly using the old glBegin() method for a long time. Now, im learning to use modern ways of specifying vertices. Here is some sample code i found online. I modified a little:
What i tried to do is, in the same VBO, use color values also:

should be the offset of the .col field in the Vertex structure (which is probably 12) as you are using a buffer object, and shouldn't be a client-side address.

There's different ways you could get this offset value including manually providing it, calculating the offset using the difference in address between a field and the start of a struct (eg. between &Vertices[0] and &Vertices[0].col) or using the offsetof macro.