2012年4月17日
摘要: 1 #include "gl/glut.h" 2 3 void Initialization() 4 { 5 glClearColor(0.0f,0.0f,0.0f,1.0f); 6 7 GLfloat lightSpecular[]={1.0,1.0,1.0,1.0}; 8 GLfloat lightPosition[]={0.5,0.5,4.0,0.0}; 9 10 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); //指定混合函数11 glShadeModel(GL_SMOOTH);12 13... 阅读全文
posted @ 2012-04-17 22:29 xiacl 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 1 #include "gl/glut.h" 2 3 void Initialization() 4 { 5 glClearColor(0.0f,0.0f,0.0f,1.0f); 6 7 glEnable(GL_BLEND);//启用混合状态 8 } 9 10 void OnDisplay(void)11 {12 GLUquadricObj *obj; //定义实用库中的二次曲面指针13 14 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);15 16 glMatrixMode(GL_MODEL... 阅读全文
posted @ 2012-04-17 22:00 xiacl 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 1 #include "gl/glut.h" 2 #define NO 0 3 #define YES 1 4 5 int Drawing; 6 7 void Initialization() 8 { 9 glClearColor(0.0f,0.0f,0.0f,1.0f); 10 11 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_DST_ALPHA); 12 13 glEnable(GL_POINT_SMOOTH); //启用点反走样 14 glHint(GL_POINT_SMOOT... 阅读全文
posted @ 2012-04-17 20:50 xiacl 阅读(1099) 评论(0) 推荐(0) 编辑