2008年11月5日

《基于MFC的OpenGL编程》Part 10 Texture Mapping

摘要: 本文在第9篇文章的基础上,为立方体加入纹理映射的功能。 Texture Mapping Texture Mapping in OpenGL is a fairly straightforward concept. Every texture is nothing but an image of some sort. Texture mapping is basically applyin... 阅读全文

posted @ 2008-11-05 22:06 Phinecos(洞庭散人) 阅读(5224) 评论(5) 推荐(0) 编辑

《基于MFC的OpenGL编程》Part 9 Lighting

摘要: 本文在第8篇文章的基础上,为其加入灯光效果。 Materials OpenGL materials are description of what objects are made of. It basically specifies how much of light they reflect and this is what we would be seeing. OpenGL li... 阅读全文

posted @ 2008-11-05 21:04 Phinecos(洞庭散人) 阅读(4312) 评论(7) 推荐(0) 编辑

《基于MFC的OpenGL编程》Part 8 Colors

摘要: OpenGL支持两种颜色模式:RGBA和颜色索引模式,本文关注于前者。 Smooth Shading and Flat Shading When Smooth Shading is specified, the color values are interpolated between vertices. If Flat Shading is specified, one verte... 阅读全文

posted @ 2008-11-05 20:35 Phinecos(洞庭散人) 阅读(4110) 评论(2) 推荐(0) 编辑

《基于MFC的OpenGL编程》Part 7 Animation

摘要: 本文中将对第5篇文章的太阳系模型进行修改,加入一些动画效果。此外还会加入显示帧速率的代码。 加入动画效果最容易的方法是响应WM_TIMER消息,在其消息处理函数中改变一些参数值,比如每过多少毫秒就旋转一定的角度,并且重绘场景。 Frame Rate Frame rate is nothing but the number of frames that can be ren... 阅读全文

posted @ 2008-11-05 20:12 Phinecos(洞庭散人) 阅读(6314) 评论(41) 推荐(0) 编辑

《基于MFC的OpenGL编程》Part 6 Keyboard and Mouse Control

摘要: 在上一篇的基础上加入对键盘和鼠标的事件处理程序,以便用其来控制3D物体的旋转和移动。 1,首先在CCY457OpenGLView类中为WM_KEYDOWN, WM_LBUTTONDOWN, WM_LBUTTONUP 和 WM_MOUSEMOVE四个事件加入事件处理函数。 2,在CCY457OpenGLView.h中加入下列用于控制旋转和移动的变量: Code highlighti... 阅读全文

posted @ 2008-11-05 16:42 Phinecos(洞庭散人) 阅读(6698) 评论(3) 推荐(0) 编辑

《基于MFC的OpenGL编程》Part 5 Transformations - Rotations, Translations and Scaling

摘要: Transformations - Translation, Rotation and Scaling Translation is nothing but moving along an arbitrary axis. Rotation is spinning about an arbitrary axis. Scaling is increase or decrease in size alo... 阅读全文

posted @ 2008-11-05 16:12 Phinecos(洞庭散人) 阅读(6251) 评论(2) 推荐(0) 编辑

《基于MFC的OpenGL编程》Part 4 Drawing Simple 3D objects

摘要: 视见体 Viewing Volume is nothing but the region of 3D Cartesian space in that will occupy the window. It is nothing but the minimum and maximum x, y and z values that are inside the window. So if a verte... 阅读全文

posted @ 2008-11-05 15:48 Phinecos(洞庭散人) 阅读(8820) 评论(14) 推荐(2) 编辑

《基于MFC的OpenGL编程》Part 3 Drawing Simple 2D Shapes

摘要: 剪裁区域 In OpenGL when you create a window to draw in we must specify the coordinate system we want to use and how to map the specified coordinates into physical screen coordinates. We would be usin... 阅读全文

posted @ 2008-11-05 15:07 Phinecos(洞庭散人) 阅读(9315) 评论(10) 推荐(2) 编辑

《基于MFC的OpenGL编程》系列文章

摘要: 《基于MFC的OpenGL编程》系列文章 阅读全文

posted @ 2008-11-05 10:50 Phinecos(洞庭散人) 阅读(28383) 评论(2) 推荐(7) 编辑

导航