⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gogi.c

📁 任意给定三维空间的点集
💻 C
字号:
#ifdef  GOGI    //qglColor( white );		      // Shorthand for glColor3f or glIndex        GLfloat specular [] = { 1.0, 1.0, 1.0, 1.0 };    GLfloat shininess [] = { 100.0 };        // Set the clear color to black    glClearColor(0.0, 0.0, 0.0, 0.0);        // Set the shading model    glShadeModel(GL_SMOOTH);    // Set the polygon mode to fill    //glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);    // Enable depth testing for hidden line removal    glEnable(GL_DEPTH_TEST);    // Define material properties of specular color and degree of     // shininess.  Since this is only done once in this particular     // example, it applies to all objects.  Material properties can     // be set for individual objects, individual faces of the objects,    // individual vertices of the faces, etc...     glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);    glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, shininess);        // Set the GL_AMBIENT_AND_DIFFUSE color state variable to be the    // one referred to by all following calls to glColor    glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);    glEnable(GL_COLOR_MATERIAL);        GLfloat light1_position[] = {0000,10000,20000,1};    GLfloat light2_position[] = {-20000,0,0,1};    GLfloat light3_position[] = {0,0,20000,1};    GLfloat light4_position[] = {0,0,-20000,1};       //glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,GL_TRUE);    glLightfv(GL_LIGHT0, GL_POSITION, light1_position);    glLightfv(GL_LIGHT1, GL_POSITION, light2_position);    glLightfv(GL_LIGHT2, GL_POSITION, light3_position);    glLightfv(GL_LIGHT3, GL_POSITION, light4_position);    //GLfloat lightx_position[] = {1000000,0,0,1};    //GLfloat lightx_direction[] = {0,0,100};    //glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, lightx_direction);    //glLightfv(GL_LIGHT0, GL_POSITION, lightx_position);        //double  param = 0.01;    //GLfloat lmodel_ambient[] = { param, 2.0*param, 3.0*param, 1.0 };    //glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);    glEnable(GL_LIGHTING);    glEnable(GL_LIGHT0);      glEnable(GL_LIGHT1);    glEnable(GL_LIGHT2);      glEnable(GL_LIGHT3);        glPolygonMode(GL_FRONT, GL_LINE);    glPolygonMode(GL_BACK, GL_LINE);    //glEnable(GL_DEPTH_TEST);    //glDepthMask(GL_TRUE);      glEnable(GL_COLOR_MATERIAL);    glEnable(GL_NORMALIZE);        //glEnable(GL_CULL_FACE);    //glEnable(GL_BLEND);    //glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);    glColorMaterial(GL_FRONT_AND_BACK,GL_DIFFUSE);    //glClearColor(1, 1, 1, 0);   /* Background color = Black*/    //glEnable(GL_CULL_FACE);    glShadeModel( GL_SMOOTH );    //glEnable(GL_DEPTH_TEST);      float transparency = 1.0;    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);    //glColor4f(1.0,1.0,1.0,transparency);#endif  // GOGI    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -