//#include
#include
#include
using namespace std;
float rtri;
float rquad;
GLfloat points0[5][3] = { {0,1,0},{-1,-1,1},{1,-1,1},{1,-1,-1},{-1,-1,-1} };
GLfloat points1[8][3] = { {1,1,-1},{-1,1,-1},{-1,1,1},{1,1,1},{1,-1,1},{-1,-1,1},{-1,-1,-1},{1,-1,-1} };
//四棱锥颜色
GLfloat Colors0[4][3] = { {1,0,0},{0,1,0},{0,0,1},{1,1,0} };
//立方体颜色
GLfloat Colors1[6][3] = { {0,1,0},{1,0.5,0},{1,0,0},{1,1,0},{0,0,1},{1,0,1} };
//四棱锥顶点序列号
int vertice0[4][3] = { {0,1,2},{0,2,3},{0,3,4},{0,4,1} };
//立方体顶点序列号
int vertice1[6][4] = { {0,1,2,3},{4,5,6,7},{3,2,5,4},{7,6,1,0},{2,1,6,5},{0,3,4,7} };
void InitGl(GLvoid)
{
glShadeModel(GL_SMOOTH);
glClearColor(1.0f,1.0f,1.0f,1.0f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);