I have a struct called Point
(which happens to be a Python Extension) that looks like this:
struct Point {
PyObject_HEAD // Macro that expands to include a few more members
double x;
double y;
};
And I have another struct that will hold a bunch of these in two arrays:
struct Polygon {
int length;
Point **vertex_points;
Point **texcrd_points;
}
I want to use these to map both the Vertices and Texture Coordinates of a Polygon with Vertex Arrays. The problem is that Vertex Arrays expect arrays in the format:
[x, y, x, y, x, y, etc]
Is there a way I can call glVertexPointer
and glTexCoordPointer
with Polygon->vertex_points
and Polygon->texcrd_points
, or do I have to construct new arrays that match what gl*Pointer is expecting?