文章 2018-01-08 来自:开发者社区

《基于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...

文章 2018-01-08 来自:开发者社区

《基于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 applyi...

文章 2017-12-30 来自:开发者社区

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

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

文章 2017-12-29 来自:开发者社区

《基于MFC的OpenGL编程》Part 1 A Primer

3D图形学基本概念 Perspective Perspective refers to the angles between the lines that lend the illusion of three dimensions. Colors and Shading Moving beyond line drawing, we need to add color to create ...

文章 2017-12-29 来自:开发者社区

《基于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 light.....

文章 2017-12-23 来自:开发者社区

《基于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. W...

文章 2017-12-22 来自:开发者社区

《基于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 vert....

文章 2017-12-22 来自:开发者社区

《基于MFC的OpenGL编程》Part 13 Creating 2D and 3D Text

wglUseFontBitmaps函数 The wglUseFontBitmaps() function creates a set of bitmap display lists based on the glyphs in the currently selected font in the current DC for use in the current OpenGL RC. It b.....

文章 2017-12-22 来自:开发者社区

《基于MFC的OpenGL编程》Part 14 Quadrics

 本文在第11篇文章的基础上,为其加入显示各种二次曲面的代码;       Quadrics Every quadric has a few settings associated with it. We have to create a quadric first and then customize its settings to render the ...

文章 2017-12-22 来自:开发者社区

《基于MFC的OpenGL编程》Part 17 Shadows

  Shadows Conceptually drawing a shadow is quite simple. A shadow is produced when an object keeps light from a source from striking some object or surface behind the object, casting the shadow. ...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。