1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| typedef struct
{
float x;
float y;
float z;
float r;
float g;
float b;
};
point p[8]={
{-0.5,-0.5, 0.5,1.0,0.0,0.0},
{-0.5, 0.5, 0.5,0.0,1.0,0.0},
{ 0.5, 0.5, 0.5,0.0,0.0,1.0},
{ 0.5,-0.5, 0.5,1.0,1.0,1.0},
{-0.5,-0.5,-0.5,1.0,0.0,0.0},
{-0.5, 0.5,-0.5,0.0,1.0,0.0},
{ 0.5, 0.5,-0.5,0.0,0.0,1.0},
{ 0.5,-0.5,-0.5,1.0,1.0,1.0}};
int f[6][4]={
{0,1,2,3},
{3,2,6,7},
{4,5,6,7},
{0,1,5,4},
{1,5,6,2},
{0,4,7,3}};
int WINAPI WinMain(int argc, char *argv[])
{
glClearColor(0.0,0.0,0.0,0.0);
glColor3f(1.0,1.0,1.0);
glPointSize(2.0); |
Partager