|
|
typedef struct primtives_struct {
int type; // type of primitive
float r,g,b; // color
float pnts[2][2]; // two points to define primitive geometry (x,y)
float depth; // z-value for the points
float linewidth; // line width
...
} primitives_td;
...
primitives_td primitives[20];
...
void processNormalKeys(unsigned char key, int x, int y) {
printf("%d\n",key);
}
if (debug == 1) printf(....
GLdouble matrix[16];
...
glGetDoublev(GL_MODELVIEW_MATRIX,matrix);
printf("model view matrix\n");
for (i=0; i<4; i++) {
for (j=0; j<4; j++) {
printf( %f",matrix[j*4+i]);
}
printf("\n");
}