摘要: 在空间中绘图:线。点、多边形 三维螺旋线 效果 代码 void RenderScene(void){ GLfloat x,y,z,angle; //使用当前的清除色清除窗口 glClear(GL_COLOR_BUFFER_BIT); glPushMatrix(); glRotatef(xRot,1.0f,0.0f,0.0f); glRotatef(yRot,0... 阅读全文
posted @ 2011-08-23 16:53 郭—大—侠 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 应用OpenGL和GLUT制作动画 效果 代码 /* * File: bounce.c * Author: leo * * Using GLUT for OpenGL program * *使用GLUT来演示一个动画 */ #include #include #include #include #include //初始化正方形的位置和大小GLfloat x1 = 10... 阅读全文
posted @ 2011-08-23 11:14 郭—大—侠 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 用OpenGL绘制图形 结果 代码 /** File: main.c* Author: leo** Drawing a simple 3D rectangle program with GLUT* OpenGL ~~*/ #include #include #include #include #include //called to draw scene void RenderSce... 阅读全文
posted @ 2011-08-23 10:32 郭—大—侠 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 效果 程序如下: /** File: main.c* Author: leo** Created on 2011年8月22日, 下午4:42*/ #include #include #include #include #include //called to draw scene void RenderScene(void) { //clear the window with ... 阅读全文
posted @ 2011-08-23 09:02 郭—大—侠 阅读(354) 评论(0) 推荐(0) 编辑