Original Post
Im going to keep this simple for you, so I might get a reply, I hope!
Simple use of glVertexArray
static GLint vertices[] = {25, 25,
100, 325,
175, 25,
175, 325,
250, 25,
325, 325};
glVertexPointer (2, GL_INT, 0, vertices);
thats nice and all, but I want to use structs for my vetexs, im using this one.
typedef struct{
GLfloat x,y,z;
} t_vertex;
//fill an array
t_vertex vlist[3] = {-30,-30,0,
30,-30,0,
-30,30,0};
//this wil not work because its not a simple array, its a stuct. Also, it would be a 2D array now, but it will need to look 1D for this function. Any ideas on how to do this?
glVertexPointer (3, GL_FLOAT, 0, vlist);