下载 >  开发技术 >  C++ > vc游戏编程基础
0分

vc游戏编程基础

讲变成思想,主要函数,以及DX等
2007-08-02 上传大小:111KB
立即下载 开通VIP
分享
收藏 举报
vc游戏编程入门

作者:王鹏生<br>前言<br><br>生活的意义是什么?<br><br>我一直弄不懂这个问题。<br><br>于是,我彷徨,我不知道我该做些什么;<br><br>什么才是真的有意义!<br><br> <br><br>我读历史,可是历史却连人是怎么来的都弄不清楚;<br><br>我读未来,未来又告诉我人类所在的地球将会毁灭。<br><br>我便读现在,可历史却告诉我:现在的一切都是不可辨的,对错需要让后人去评说;<br><br>我相信哲学,可未来也告诉我:哲学是会变的,它只是人的世界观的一种反映。<br><br> <br><br>我活着是为了什么?<br><br>为了享乐?快乐和痛苦一样,只是一种感受;哪一种更好受,是随着心境而不同。<br><br>为了人类的延续?可是,地球的生命毕竟有限!<br><br>生活的意义,我一直在探索。。。。。。<br><br> <br><br>突然有一天,未来告诉我:<br><br>借助计算机科技,人类将有走出地球的希望!<br><br>于是,我终于知道我是为了什么而活着:<br><br>为了人类尽早能够走出地球!<br><br> <br><br>当然,我没有那么大的能力。<br><br>当然,我有我的历史使命。<br><br>我只能用我的力所能及,为人类出一份力。<br><br>那就是加快计算机的发展!<br><br> <br><br>计算机是有限的机器;<br><br>科学却有无限的能力;<br><br>我们必须利用计算机来探索科学;<br><br>然后利用科学来扩大计算机的有限范围;<br><br> <br><br>继续、继续、继续;<br><br>终于有一天,我们能够坐着由计算机控制的<br><br>一种现在还不知道的东西,飞出地球,<br><br>飞到人类新的天地!<br><br> <br><br>之前:<br><br>只要我没有弄清生活的意义,我不会随便放弃;<br><br>之后:<br><br>宇宙只给你一个生命,其它的要你自己去把握。<br><br> <br><br> <br><br> <br><br> <br><br> 为什么写这本书<br><br> <br><br>作为一个计算机专业的人,我们不得不学习程序。但是,程序语言的那么多教材,大部分都是枯燥无味!<br><br>我喜欢游戏,我一开始就在找关于游戏的编程的书籍。可是,少之又少。<br><br>但是,我并不死心。我可以观察我所接触的游戏,自己思考它们的算法,我用我自己的方式重新实现游戏。<br><br> <br><br>是的,由于一开始的成功,使我从此迷上了游戏。可以说,正是游戏,正是对游戏编程的热衷,我在编程上有了长进。<br><br>一旦你知的越多,你就越觉得懂的越少,就会更加努力的去探索。<br><br>我的大学是和同学们一样在游戏中度过。<br><br>只是,他们大多数是在玩游戏,我是在编游戏。<br><br> <br><br>终于,我发现,年轻人都是很喜欢游戏。<br><br>更重要的是,我发现游戏对于我自己对程序的学习,有很大的帮助。<br><br>那么,对于别人,是否也如此?<br><br>于是,我一直想着去实现这种尝试!<br><br> <br><br>现在,我终于有了这本书。<br><br>我希望有人支持我的想法,让它得以出版。<br><br> <br><br> <br><br> 说 明<br><br> <br><br> <br><br>虽然这本书有些简单,可是,它包含的内容其实也不少。<br><br>简单是因为我不想让它太复杂化,我尽量争取一个游戏程序,不到十面纸。事实也是如此:其中那么多的代码,有一半是详细的解释。<br><br>简单的另一个原因是,一个农民的儿子,我知道学生买一本大书的痛苦。<br><br>这本书不同于一般的书的地方在于:它是以游戏的实现为主线,附加一些程序涉及到的其它内容。<br><br> <br><br>另外,附带代码软盘一张。<br><br>

立即下载
3积分/C币
vc 串口编程示例

vc 使用MSCOMM32控件的串口通信编程实例 简单易懂

立即下载
50积分/C币
Visual C++ 游戏编程基础

《Visual C++ 游戏编程基础》一书的源代码,因文件太大,分四个部分上传,此为第四部分

立即下载
3积分/C币
Visual C++游戏编程基础 PDF+源码

Visual C++游戏编程基础 PDF+源码 的下载地址~

立即下载
50积分/C币
Visual C++ 游戏编程基础 完整全部源码

Visual C++ 游戏编程基础是一本非常适于新手入门游戏开发的书,书中提供了大量代码供读者进行学习,此处提供了本书需要的全部源码。

立即下载
1积分/C币
VC++ 6游戏编程

VC 6游戏编程VC 6游戏编程VC 6游戏编程VC 6游戏编程VC 6游戏编程VC 6游戏编程VC 6游戏编程VC 6游戏编程VC 6游戏编程VC 6游戏编程VC 6游戏编程

立即下载
3积分/C币
Direct X 11 3D 游戏开发编程基础 中文版

著名图形学著作,DX入门基础,被称为龙书,DX9 的升级版 DX11 3D 游戏开发基础 DX11版 中文版

立即下载
5积分/C币
vc游戏编程 经典小游戏的vc实现

vc游戏编程,vc游戏编程 vc游戏编程,vc游戏编程

立即下载
3积分/C币
DirectX9.0游戏开发编程基础pdf (高清可复制内容版)

希望对大家有所帮助 《DirectX 9 3D游戏设计入门》 .............................................................................................. 1 第一部分 必备的数学知识 (Mathematical Prerequisites) .......................................................... 10 目标 ........................................................................................................................................................ 10 三维空间中的向量 ................................................................................................................................. 11 向量相等 ................................................................................................................................................ 13 计算向量大小(向量的模) ................................................................................................................. 14 标准化向量 ............................................................................................................................................ 14 向量相加 ................................................................................................................................................ 15 向量相减 ................................................................................................................................................ 16 标量与向量的乘积 ................................................................................................................................ 16 点积 ........................................................................................................................................................ 17 叉积 ........................................................................................................................................................ 17 矩阵 ........................................................................................................................................................ 18 相等、数乘矩阵以及相加 ..................................................................................................................... 19 乘法 ........................................................................................................................................................ 19 单位矩阵 ................................................................................................................................................ 20 逆转 ........................................................................................................................................................ 21 矩阵的转置 ............................................................................................................................................ 21 D3DX 矩阵 ........................................................................................................................................... 22 基本变换 ................................................................................................................................................ 24 矩阵平移 ................................................................................................................................................ 25 矩阵旋转 ................................................................................................................................................ 26 矩阵缩放 ................................................................................................................................................ 28 综合变换 ................................................................................................................................................ 29 一些向量变换函数 ................................................................................................................................ 30 平面 ........................................................................................................................................................ 31 D3DX平面 ............................................................................................................................................ 31 点和平面的空间关系 ............................................................................................................................. 32 创建平面 ................................................................................................................................................ 32 标准化平面 ............................................................................................................................................ 33 变换平面 ................................................................................................................................................ 34 点到平面上最近的点 ............................................................................................................................. 34 射线(可选的) .................................................................................................................................... 35 射线 ........................................................................................................................................................ 35 线/面相交 ............................................................................................................................................... 35 摘要(略) ............................................................................................................................................ 36 第二部分 Direct3D基础 (Direct3D Fundamentals) .................................................................. 37 第一章 初始化Direct3D (Direct3D Initialization) .................................................... 37 目标 ........................................................................................................................................................ 37 1.1 Direct3D概述 .................................................................................................................................. 37 1.1.1 REF设备 ............................................................................................................................... 38 1.1.2 D3DDEVTYPE ...................................................................................................................... 38 1.2 COM ................................................................................................................................................. 38 1.3 一些准备工作 ................................................................................................................................. 38 1.3.1 表面 ...................................................................................................................................... 39 1.3.2 Multisampling ........................................................................................................................ 40 1.3.3像素格式 ............................................................................................................................... 41 1.3.4 内存池 .................................................................................................................................. 41 1.3.5 交换链和页面切换 ............................................................................................................... 41 1.3.6 深度缓冲 ............................................................................................................................... 42 1.3.7 顶点处理 ............................................................................................................................... 43 1.3.8 设备能力 ............................................................................................................................... 43 1.4 初始化Direct3D ............................................................................................................................. 44 1.4.1获得IDirect3D9接口 ............................................................................................................ 44 1.4.2 检测硬件顶点处理 ............................................................................................................... 45 1.4.3 填充D3DPRESENT_PARAMETERS结构 ........................................................................ 46 1.4.4 创建IDirect3DDevice9对象................................................................................................ 47 1.5 初始化Direct3D实例 ..................................................................................................................... 48 1.5.1 d3dUtility.h/cpp ...................................................................................................................... 49 1.5.2 实例框架 ............................................................................................................................... 50 1.5.3 D3D Init实例 ........................................................................................................................ 51 1. 6摘要(略) ................................................................................................................................. 53 第二章 渲染管线 (The Rendering Pipeline) .......................................................... 54 目标 ........................................................................................................................................................ 54 2.1表现模型 .......................................................................................................................................... 54 2.1.1 顶点格式 ............................................................................................................................... 55 2.1.2 三角形 .................................................................................................................................. 56 2.1.3 索引 ...................................................................................................................................... 57 2.2虚拟照相机 ...................................................................................................................................... 57 2.3 渲染管线 ......................................................................................................................................... 58 2.3.1自身坐标系(Local Space) ................................................................................................ 59 2.3.2世界坐标系(World Space) ................................................................................................ 59 2.3.3视图坐标系(View Space) ................................................................................................. 60 2.3.4背面拣选(Backface Culling) ............................................................................................ 61 2.3.5光源(Lighting) .................................................................................................................. 62 2.3.6裁剪(Clipping) .................................................................................................................. 63 2.3.7投影(Projection)................................................................................................................ 63 2.3.8视口变换(Viewport Transform) ........................................................................................ 65 2.3.9光栅化(Rasterization) ....................................................................................................... 66 2.4 摘要(略) .......................................................................................................................................... 66 第三章 在Direct3D中绘制 (Drawing in Direct3D) .................................................. 67 目标 ........................................................................................................................................................ 67 3.1顶点/索引缓存 ................................................................................................................................. 67 3.1.1创建一个顶点和索引缓存 .................................................................................................... 67 3.1.2 访问缓冲内存 ....................................................................................................................... 69 3.1.3 找回顶点和索引缓存信息 ................................................................................................... 70 3.2 渲染状态 ......................................................................................................................................... 70 3.3 绘制准备 ......................................................................................................................................... 71 3.4用顶点/索引缓存绘制 ...................................................................................................................... 71 3.4.1 IDirect3DDevice9::DrawPrimitive ......................................................................................... 72 3.4.2 IDirect3DDevice9::DrawIndexedPrimitive ............................................................................ 72 3.4.3 开始/结束场景 ...................................................................................................................... 73 3.5 D3DX几何物体 ............................................................................................................................... 73 3.6 实例程序:三角形、立方体、茶壶、D3DXCreate* ................................................................... 75 3.7 摘要(略) ..................................................................................................................................... 79 第四章 色彩 (Color) ....................................................................................................... 80 目标 ........................................................................................................................................................ 80 4.1 颜色表示法 ............................................................................................................................. 80 4.2 顶点颜色 ......................................................................................................................................... 82 4.3 着色处理 ......................................................................................................................................... 83 4.4 实例程序:彩色三角形 .................................................................................................................. 83 4.5 摘要(略) .......................................................................................................................................... 85 第五章 灯光 (Lighting) ................................................................................................. 86 目标 ........................................................................................................................................................ 86 5.1灯光的组成 ...................................................................................................................................... 86 5.2材质 .................................................................................................................................................. 87 5.3顶点法线 .......................................................................................................................................... 88 5.4光源 .................................................................................................................................................. 90 5.5实例程序:灯光 ............................................................................................................................... 93 5.6附加实例 .......................................................................................................................................... 95 5.7摘要(略) ........................................................................................................................................... 96 第六章 纹理 (Texturing) .............................................................................................. 97 目标 ........................................................................................................................................................ 97 6.1 纹理坐标 ......................................................................................................................................... 97 6.2创建并赋予材质 ............................................................................................................................... 99 6.3过滤器 .............................................................................................................................................. 99 6.4 Mipmaps ..........................................................................................................................................100 6.4.1 Mipmaps过滤器 ...................................................................................................................101 6.4.2 Direct3D中使用Mipmaps ...................................................................................................101 6.5 寻址模式 ........................................................................................................................................101 6.6实例程序:有纹理的方块 ..............................................................................................................103 5. 7摘要(略) .....................................................................................................................................105 第七章 混合 (Blending) .............................................................................................. 106 目标 .......................................................................................................................................................106 7.1混合因素 .........................................................................................................................................106 7.2混合要素 .........................................................................................................................................108 7.3透明度 .............................................................................................................................................108 7.3.1Alpha通道 .............................................................................................................................108 7.3.2指定Alpha资源 ...................................................................................................................109 7.4使用DirectX纹理工具创建Alpha通道 .......................................................................................109 7.5实例程序:透明度 .......................................................................................................................... 111 7.6摘要(略) .......................................................................................................................................... 113 第八章 模版 (Stenciling) ........................................................................................... 114 目标 ....................................................................................................................................................... 115 8.1使用模版缓存 ................................................................................................................................. 115 8.1.1请求一个模版缓存 ............................................................................................................... 115 8.1.2模版测试 ............................................................................................................................... 115 8.1.3控制模版测试 ....................................................................................................................... 116 8.1.3.1模版参考值(Reference Value) ..................................................................................... 116 8.1.3.2模版掩码 ............................................................................................................................ 116 8.1.3.3模版值(Stencil Value) .................................................................................................. 116 8.1.3.4比较运算 ............................................................................................................................ 116 8.1.3更新模版缓存 ....................................................................................................................... 117 8.1.4模版写掩码 ........................................................................................................................... 118 8.2实例程序:镜子 .............................................................................................................................. 118 8.2.1反射数学 ............................................................................................................................... 118 8.2.2镜面实现流程 .......................................................................................................................120 8.2.3代码和解释 ...........................................................................................................................121 8.2.3.1第一部分 ............................................................................................................................121 8.2.3.2第二部分 ............................................................................................................................122 8.2.3.3第三部分 ............................................................................................................................122 8.2.3.4第四部分 ............................................................................................................................123 8.2.3.5第五部分 ............................................................................................................................123 8.3实例程序:平面阴影 ......................................................................................................................124 8.3.1平行光阴影 ...........................................................................................................................125 8.3.2点光源阴影 ...........................................................................................................................126 8.3.3阴影矩阵 ...............................................................................................................................126 8.3.4用模版缓存防止双倍混合 ...................................................................................................127 8.3.5代码和解释 ...........................................................................................................................128 8.4摘要(略) ..........................................................................................................................................129 第三部分 实用的Direct3D (Applied Direct3D) ....................................................................... 130 第九章 字体 (Fonts) ..................................................................................................... 130 目标 .......................................................................................................................................................130 9.1 ID3DXFont......................................................................................................................................130 9.1.1创建一个ID3DXFont ...........................................................................................................130 9.1.2绘制文本 ...............................................................................................................................131 9.1.3计算每秒的渲染帧数 ...........................................................................................................131 9.2 CD3DFont .......................................................................................................................................132 9.2.1创建一个CD3DFont ............................................................................................................132 9.2.2绘制文本 ...............................................................................................................................133 9.2.3 清除 .....................................................................................................................................133 9.3 D3DXCreateText ..............................................................................................................................133 9.4摘要(略) ..........................................................................................................................................135 第十章 网格模型I (Meshes Part I) ........................................................................... 136 目标 .......................................................................................................................................................136 10.1 几何信息 ......................................................................................................................................136 10.2 子集和属性缓存 ...........................................................................................................................137 10.3 绘制 ..............................................................................................................................................138 10.4 优化 ..............................................................................................................................................138 10.5 属性表 ..........................................................................................................................................140 10.6 邻接信息 ......................................................................................................................................141 10.7 复制 ..............................................................................................................................................142 10.8 创建一个Mesh(D3DXCreateMeshFVF) ................................................................................143 10.9 实例程序:创建和渲染Mesh .....................................................................................................144 10.10 摘要(略) .....................................................................................................................................148 第十一章 网格模型II (Building a Flexible Camera Class) .............................. 149 目标 .......................................................................................................................................................149 11.1 ID3DXBuffer .................................................................................................................................149 11.2 X文件 ...........................................................................................................................................150 11.2.1读取X文件 ........................................................................................................................150 11.2.2 X文件的材质 .....................................................................................................................151 11.2.3 实例程序:X文件 ............................................................................................................151 11.2.4 产生顶点法线 ....................................................................................................................154 11.3渐进网格(Progressive Meshes) ................................................................................................155 11.3.1 产生一个渐进网格 ............................................................................................................156 11.3.2 顶点品质权重 ....................................................................................................................156 11.3.3 ID3DXPMesh方法 .............................................................................................................157 11.3.4实例程序:渐进网格 .........................................................................................................158 11.4 界线容积(Bounding Volumes) .................................................................................................160 11.4.1一些新的特殊常量 .............................................................................................................162 11.4.2界线容积类型 .....................................................................................................................162 11.4.3实例程序:界线容积 .........................................................................................................163 11.5 摘要(略) .......................................................................................................................................165 第十二章 创建灵活的摄像机类 (Building a Flexible Camera Class) ................ 166 目标 .......................................................................................................................................................166 12.1 摄像机设计 ..................................................................................................................................166 12.2 执行详细资料 ...............................................................................................................................168 12.2.1计算视图矩阵 .....................................................................................................................168 12.2.1.1 第一部分:平移 .............................................................................................................168 12.2.1.2 第二部分:旋转 .............................................................................................................169 12.2.1.3 将两部分合并 .................................................................................................................169 12.2.2围绕任意轴旋转 .................................................................................................................170 12.2.3 Pitch、Yaw和Roll ............................................................................................................171 12.2.4 Walking、Strafing和Flying ..............................................................................................173 12.3实例程序:摄像机 ........................................................................................................................174 12.4 摘要 ..............................................................................................................................................176 第十三章 地形渲染基础 (Basic Terrain Rendering) ............................................. 177 目标 .......................................................................................................................................................177 13.1 Heightmaps(高度图) .................................................................................................................177 13.1.1 创建高度图(Heightmap) ..............................................................................................178 13.1.2 读取RAW文件 .................................................................................................................179 13.1.3 访问与修改Heightmap .....................................................................................................180 13.2 生成地形几何数据 .......................................................................................................................180 13.2.1 计算顶点 ............................................................................................................................182 13.2.2 计算索引-定义三角形 .......................................................................................................184 13.3 纹理 ..............................................................................................................................................186 13.3.1 程序上的处理方法 ............................................................................................................186 13.4 光照 ..............................................................................................................................................189 13.4.1概览(OVERVIEW) .............................................................................................................189 13.4.2 计算方格的阴影(Shade) ..............................................................................................190 13.4.3 地形阴影(Shading) .......................................................................................................191 13.5 在地形上“行走” .......................................................................................................................192 13.6 例子程序: Terrain .........................................................................................................................194 13.7 一些改进 ......................................................................................................................................196 13.8 摘要 ..............................................................................................................................................197 第十四章 粒子系统 (Particle Systems) ................................................................... 198 目标: ...................................................................................................................................................198 14.1 粒子和点精灵(Point Sprite) ....................................................................................................198 14.1.1 结构的格式 ........................................................................................................................198 14.1.2点精灵(Point Sprite)渲染状态 ......................................................................................199 14.1.3 粒子和他们的属性 ............................................................................................................200 14.2 粒子系统的组成 ...........................................................................................................................201 14.2.1 绘制粒子系统 ....................................................................................................................205 14.2.2 随机 ...................................................................................................................................209 14.3 具体的粒子系统:雪、火、粒子枪 ...........................................................................................209 14.3.1 例子程序:雪 ....................................................................................................................210 14.3.2 例子程序:火 ....................................................................................................................212 14.3.3 例子程序:粒子枪 ............................................................................................................214 14.4 摘要 ..............................................................................................................................................216 第十五章 选取 (Picking) .............................................................................................. 217 概览(OVERVIEW) ...............................................................................................................................217 目标 .......................................................................................................................................................218 15.1 屏幕到投影窗口的转换 ...............................................................................................................218 15.2 计算射线 ......................................................................................................................................220 15.3 变换射线 ......................................................................................................................................220 15.4 射线-对象 交点 .........................................................................................................................221 15.5 例子程序:选取 ...........................................................................................................................223 15.6 摘要 ..............................................................................................................................................224 第四部分 着色器和特效 (Shaders and Effects) ..................................................................... 225 第十六章 高级着色器语言入门 (Introduction to the High-Level Shading Language)................................................................................................................. 225 目标 .......................................................................................................................................................225 16.1 编写HLSL 着色器 ......................................................................................................................226 16.1.1 全局变量 ............................................................................................................................227 16.1.2 输入和输出结构 ................................................................................................................227 16.1.3 函数的入口点 ....................................................................................................................228 16.2 编译HLSL 着色器 ......................................................................................................................229 16.2.1 常量表 ...............................................................................................................................229 16.3 变量类型 ......................................................................................................................................233 16.3.2 向量类型 ............................................................................................................................234 16.3.3 矩阵类型 ............................................................................................................................235 16.3.4 数组 ...................................................................................................................................236 16.3.5 结构 ...................................................................................................................................236 16.3.6 typedef关键字 ....................................................................................................................237 16.4关键字、语句和强制转换 ............................................................................................................238 16.4.1 关键字 ...............................................................................................................................238 16.4.2 基本程序流程 ....................................................................................................................238 16.4.3 强制转换(casting) .........................................................................................................239 16.5 操作符 ..........................................................................................................................................239 16.6 用户定义函数 ...............................................................................................................................241 16.7内建函数 .......................................................................................................................................242 16.8 摘要 ..............................................................................................................................................244 第十七章 顶点着色器入门 (Introduction to Vertex Shaders) .......................... 245 概览 .......................................................................................................................................................245 目标 .......................................................................................................................................................246 17.1顶点声明 .......................................................................................................................................246 17.1.1 描述顶点声明 ....................................................................................................................246 17.1.2 创建顶点声明 ....................................................................................................................248 17.1.3 使用一个顶点声明 ............................................................................................................249 17.2顶点数据用途 ...............................................................................................................................249 17.3使用顶点着色器的步骤 ................................................................................................................250 17.3.1 编写并编译顶点着色器 ....................................................................................................251 17.3.2 创建顶点着色器 ................................................................................................................251 17.3.3 建立顶点着色器 ................................................................................................................251 17.3.4 销毁顶点着色器 ................................................................................................................252 17.4样例应用程序:散射光照 ............................................................................................................252 17.5 卡通渲染 ......................................................................................................................................257 17.5.1 卡通着色 ............................................................................................................................258 17.5.2 卡通着色的顶点着色器代码 ............................................................................................259 17.5.3轮廓勾勒 .............................................................................................................................260 17.5.4 轮廓边顶点着色器代码 ....................................................................................................263 17.6 摘要 ..............................................................................................................................................265 第十八章 像素着色器入门 (Introduction to Pixel Shaders) .............................. 266 目标 .......................................................................................................................................................266 18.1多纹理化概览 ...............................................................................................................................266 18.1.1 允许多个纹理 ....................................................................................................................268 18.1.2 多纹理坐标 ........................................................................................................................269 18.2像素着色器输入和输出 ................................................................................................................269 18.3使用像素着色器的步骤 ................................................................................................................270 18.3.1 编写并编译像素着色器 ....................................................................................................270 18.3.2 创建像素着色器 ................................................................................................................271 18.3.3 建立像素着色器 ................................................................................................................271 18.3.4 销毁像素着色器 ................................................................................................................271 18.4 HLSL采样器对象 .........................................................................................................................272 18.5 例子程序:Multitexturing in a Pixel Shader ................................................................................273 18.6 摘要 ..............................................................................................................................................280 第十九章 效果架构 (The Effects Framework) ....................................................................... 281 概览 .......................................................................................................................................................281 目标 .......................................................................................................................................................281 19.1 技术与传递(Techniques and Passes) .......................................................................................281 19.2 更多HLSL内置对象( More HLSL Intrinsic Objects) ..........................................................282 19.2.1 纹理对象 ............................................................................................................................283 19.2.2 采样器对象与采样器状态 ................................................................................................283 19.2.3 顶点与像素着色器对象(Vertex and Pixel Shader Objects) .........................................283 19.2.4 字符串 ...............................................................................................................................284 19.2.5 注解 (Annotations) ............................................................................................................285 19.3 效果文件的设备状态( Device States in an Effect File) .........................................................285 19.4 创建效果 ......................................................................................................................................286 19.5 设置系数(Setting Constants) ...................................................................................................287 19.6 使用效果 ......................................................................................................................................289 19.6.1 获得效果句柄( Obtaining a Handle to an Effect) .......................................................289 19.6.2 激活一个效果( Activating an Effect) ..........................................................................289 19.6.3 启动效果 ............................................................................................................................290 19.6.4 设置当前的渲染传递(Setting the Current Rendering Pass) ........................................290 19.6.5 结束效果(Ending an Effect) .........................................................................................290 19.6.6 例子 ...................................................................................................................................290 19.7 例子程序: Lighting and Texturing in an Effect File .....................................................................291 19.8例子程序: Fog Effect .....................................................................................................................296 19.9例子程序: Cartoon Effect ..............................................................................................................298 19.10 效果编辑(EffectEdit) .............................................................................................................299 19.11摘要 .............................................................................................................................................300 略 ...........................................................................................................................................................300 相关文章: ............................................................................................... 301 AGP内存 .......................................................................................................................... 301 Direct3D中实现图元的鼠标拾取 .......................................................................................... 303 1、什么是拾取,拾取能做什么? ..............................................................................................303 2、拾取操作的步骤和实现 ..........................................................................................................303 3、结束及声明..............................................................................................................................309 4、参考文献.................................................................................................................................310 克莱姆(Cramer)法则 ....................................................................................................... 311 一、线性方程组 ................................................................................................................................... 311 三、齐次线性方程组 ............................................................................................................................313 四、例子 ...............................................................................................................................................314

立即下载
3积分/C币
C++游戏与图形编程基础 第2版

《C++游戏与图形编程基础》作为入门教材,采用一种新颖、有趣的“寓教于乐”的方式来讲授传统主题,即鼓励并引导学生亲自动手写程序来生成图形、处理图像/声音和玩游戏。书中这些经过精心设计的例子和作业,可以大大激发读者的学习兴趣,使他们在整个课程中兴趣盎然地专心学,动手做。

立即下载
50积分/C币
DirectX11游戏编程入门(中文版).pdf

对学习DirectX11游戏编程很有帮助的了。

立即下载
50积分/C币
游戏编程数学与物理基础.pdf

游戏编程数学与物理基础.pdf希望对你有帮助

立即下载
10积分/C币
vc网络游戏编程资源

vc网络游戏编程 vc网络游戏编程vc网络游戏编程 vc网络游戏编程

立即下载
3积分/C币
《DirectX 11游戏编程入门》(中文版+英文版+word版本+本书源代码)高清带目录

本资源是以压缩包的形式的, 里面是一个 “TXT”的文档, 文档中 有“百度云” 分享的链接, 这本书太大,上传不上来,所以以这样的方式上传。永久有效,欢迎下载。 文档里留有本人的扣扣、微信,运到问题可以联系, 不忽悠。 本资源里面包含: 本书的英文版(pdf格式)、本书的中文版(pdf格式)、本书的word版本、本书源代码 内容介绍: 内容介绍: 本书是《Beginning DirectX 10 Game Programming》一书的后续版本。在本书中,我们将讲授使用最新版Direct3D——Direct3D 11创建游戏图形的基本知识。 本书致力于教会您关于DirectX 11的各个方面。此书适用于具有一点儿或者完全没有DirectX开发经验的初中级C++编程人员。虽然有过DirectX或者OpenGL的使用经验对学习本书会更有帮助,但这不是必须。 当你学完本书之后,将掌握足够的DirectX 11的知识,从而能够自己独立制作简单的视频游戏程序。 阅读本书应具备的知识: 本书假设你具有C++方面的知识,并且熟悉C++编程语言。本书还假定您具有Visual Studio 2010的使用经验,而且至少具备高中水平的数学知识。 本书中我们使用Visual Studio C++ 2010 Express,您可以从微软官方网站:“www.microsoft.com/express/Down-loads”上下载。同时还需要使用June 2010 DirectX SDK,可以从:“http://msdn.microsoft.com/en-us/directx”下载到。

立即下载
4积分/C币
DirectX9.0+3D游戏开发编程基础(PDF+源码)

DirectX9.0+3D游戏开发编程基础(PDF+源码) 适合想学习DirectX9技术的人看 随书代码 MSVC2007编译通过。

立即下载
50积分/C币
游戏编程入门高清扫描版.pdf

余刚等翻译的,作者是【Michael Morrison 】【美】人民邮电出版社 清晰版

立即下载
30积分/C币
( vc 6游戏编程入门及源码.

vc 6游戏编程入门及源码. 开发游戏的,从基础到精通。

立即下载
3积分/C币
零基础游戏编程学习资料by浅墨高清完整版PDF合集

首先呢,分享精神至上~~ 压缩包里面的资料清单(零编程基础开始,可以按顺序学习): 1.《C++ primer中文版》 2.《Windows程序设计第五版》 3.《VC++深入详解》 4.《Windows核心编程》 5.《Effective STL中文版》 6.《Windows游戏编程大师技巧》 7.《DIRECTX.9.0.3D游戏开发编程基础》

立即下载
30积分/C币
c++游戏与图形编程(第二版)

《C++游戏与图形编程基础(第2版)》中采用新颖有趣的方式来讲授传统的C++编程方法与技巧,通过丰富有趣的案例和各种各样的编程练习、算法训练来指导读者进行编程实践,动手开发小游戏。《C++游戏与图形编程基础(第2版)》由浅入深,在确认读者掌握基本的编程知识之后再介绍面向对象的概念,同时还借助于图形、动画、声音和游戏编程来进一步激发读者的学习兴趣,并在最后用整章的篇幅来引导读者实现一个完整的电脑游戏。 《C++游戏与图形编程基础(第2版)》共两部分11章,在介绍C++基础知识、布尔逻辑、重复结构、函数和数组之后,借助于AGK开发包来实践C++游戏和图形编程,非常适合课堂教学和自学。

立即下载
5积分/C币
全套完整Flash游戏编程基础教程和源码

全套完整Flash游戏编程基础教程和源码,方便初学者下载学习

立即下载
3积分/C币
BOX2D 物理游戏编程初学者指南 陈文登(高清,带目录)

高清带目录《Box2D物理游戏编程初学者指南》系统地梳理学习Box2D物理游戏编程的各个知识点,并通过图解、问答、举例等形式深入浅出地讲解初学者觉得晦涩难懂的概念、术语。   《Box2D物理游戏编程初学者指南》最后,通过大量的游戏效果模拟,直截了当地介绍相关知识点的实际应用,这些游戏包括《愤怒的小鸟》《叫醒盒子》《跨越重力》《星星大盗》《割绳子》等

立即下载
5积分/C币
VC++游戏编程资源

VC++游戏编程资源源代码第二章

立即下载
3积分/C币
Python游戏编程入门

Python是一种解释型、面向对象、动态数据类型的高级程序设计语言,在游戏开发领域,Python也得到越来越广泛的应用,并由此受到重视。 本书教授用Python开发精彩游戏所需的最为重要的该你那。本书不只是介绍游戏编程概念的相关内容,还深入到复杂的主题。全书共14章,依次介绍了使用Pygame、文件I/O、用户输入、数学和图形编程、位图图形、精灵动画、冲突检测、数组、计时和声音、编程逻辑、三角函数、随机地形、角色扮演游戏等重要概念。每章通过一个示例游戏来展示这些知识和工具的实际应用。本书既可以帮助读者掌握相关概念来构建较为复杂的游戏,甚至进行较为复杂的Python编程。 本书内容浅显易懂,示例轻松活泼,适合Python初学者阅读,尤其适合想要掌握Python游戏编程的读者学习参考。

立即下载
50积分/C币
C++图形编程基础.pdf

介绍了mfc绘图的基础知识,包括设备对象,视图类的ondraw函数以及视图重画

立即下载
3积分/C币
Java游戏编程入门

想学JAVA游戏编程吗?快来了解下吧!这个资源是Java初学者的极品教程,讲的简单透彻。

立即下载
4积分/C币
《.NET游戏编程入门经典-c#篇》(仅电子书PDF自己建立的)

《.NET游戏编程入门经典-c#篇》(仅电子书PDF自己建立的)

立即下载
10积分/C币
VC++游戏编程最基础教程.pdf

VC++游戏编程,适合有一定基础的学者,简单易懂啦

立即下载
10积分/C币
Direct3D游戏编程入门教程(第二版)(高清PDF中文版)

本书是基于DirectX 9.0编写的,是介绍Direct3D技术的入门教程。它详细介绍了Direct3D的背景、基本知识以及3D程序设计的相关概念与技术。全书由浅入深,分为四个部分,第一部分介绍Direct3D的发展历史和基本知识,对3D程序设计中的术语、概念进行了深入讲解;第二部分着重讨论纹理映射技术,包括多重纹理等;第三部分通过多个示例来探讨高级shader编程,并对.MD3文件格式做了详细分析;第四部分是附录,对本书中用到的概念和技术背景进行了简单补充。 本书适用于略有DirectX基础的C/C++程序员学习Direct3D游戏开发,也适用于具有Direct3D开发经验的程序员参考。 本书是学习DirectX3D图形编程的入门教程。它从基础知识开始逐步介绍各项技术,最终让你轻松掌握图形编程和动画编程的方法。相对于第一版,本书深入介绍了顶点shader和像素shader编程,覆盖了微软最新的HLSL(高级Shader语言),集中介绍了固定功能的渲染流水线,并在最后介绍了一些高级的shader效果,从而可使你的游戏具有更真实的视觉表现。 这本由业界资深专家编写的入门教程将带领你实现、甚至超越那些你不断在想象的3D图形效果! 第1部分 DirectX图形:Don’t Hurt Me 第1章 Direct3D/DirectX的历史 1.1 DirectX 2.0 1.2 DirectX 6/7 1.3 DirectX 8 1.3.1 Point Sprite 1.3.2 3D纹理 1.3.3 Direct3DX实用程序库 1.3.4 顶点Shader和像素Shader 1.4 DirectX 9 1.5 小结 第2章 HAL和COM概述 2.1 硬件抽象层(Hardware Abstraction Layer,HAL) 2.2 插件式软件设备(Pluggable Software Device) 2.3 参考光栅器(Reference Rasterizer) 2.4 设备控制 2.5 COM 2.6 小结 第3章 编程约定

立即下载
5积分/C币
《Visual C++游戏编程基础》源码

包含了《Visual C++游戏编程基础》这本书的所有源码。如果有谁要这本书的话留下邮箱我发给他~

立即下载
5积分/C币
[计算机游戏编程:基础篇].何坤等.扫描版.pdf

[计算机游戏编程:基础篇].何坤等.扫描版.pdf

立即下载
10积分/C币
关闭
img

spring mvc+mybatis+mysql+maven+bootstrap 整合实现增删查改简单实例.zip

资源所需积分/C币 当前拥有积分 当前拥有C币
5 0 0
点击完成任务获取下载码
输入下载码
为了良好体验,不建议使用迅雷下载
img

vc游戏编程基础

会员到期时间: 剩余下载个数: 剩余C币: 剩余积分:0
为了良好体验,不建议使用迅雷下载
VIP下载
您今日下载次数已达上限(为了良好下载体验及使用,每位用户24小时之内最多可下载20个资源)

积分不足!

资源所需积分/C币 当前拥有积分
您可以选择
开通VIP
4000万
程序员的必选
600万
绿色安全资源
现在开通
立省522元
或者
购买C币兑换积分 C币抽奖
img

资源所需积分/C币 当前拥有积分 当前拥有C币
5 4 45
为了良好体验,不建议使用迅雷下载
确认下载
img

资源所需积分/C币 当前拥有积分 当前拥有C币
5 0 0
为了良好体验,不建议使用迅雷下载
VIP和C币套餐优惠
img

资源所需积分/C币 当前拥有积分 当前拥有C币
5 4 45
您的积分不足,将扣除 10 C币
为了良好体验,不建议使用迅雷下载
确认下载
下载
您还未下载过该资源
无法举报自己的资源

兑换成功

你当前的下载分为234开始下载资源
你还不是VIP会员
开通VIP会员权限,免积分下载
立即开通

你下载资源过于频繁,请输入验证码

您因违反CSDN下载频道规则而被锁定帐户,如有疑问,请联络:webmaster@csdn.net!

举报

若举报审核通过,可返还被扣除的积分

  • 举报人:
  • 被举报人:
  • *类型:
    • *投诉人姓名:
    • *投诉人联系方式:
    • *版权证明:
  • *详细原因: