逐梦猎人

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年7月30日

摘要: 为了便于说明,首先假设存在下列的顶点缓冲和索引缓冲 vb= { {-1.0, 1.0, 0.0}, index 0 { 1.0, 1.0, 0.0}, index 1 { 1.0,-1.0, 0.0}, index 2 {-1.0,-1.0, 0.0}, index 3 {-2.0, 2.0, 0.0}, index 4 { 2.0, 2.0, 0.0}, index 5 } 和对应该顶点缓冲的一组索引缓冲ib 初学D3D,DrawIndexedPrimitive这个函数是个难点,主要是MSDN中的解释不是很明确,这个函数共6个参数,下面对这6个参数进行一下详细的解释。 参数1:D3DPRIM 阅读全文
posted @ 2013-07-30 23:51 让知识沉淀 阅读(570) 评论(0) 推荐(0) 编辑

2012年12月23日

摘要: View Code 1 //利用D2D渲染纹理 2 #include <Windows.h> 3 #include <d3dx9.h> 4 #include <d3d9.h> 5 6 #pragma comment(lib,"d3d9.lib") 7 #pragma comment(lib,"d3dx9.lib") 8 #pragma comment(lib,"winmm.lib") 9 10 #define WNDCLASSNAME ("ZMD3D") 11 #define W 阅读全文
posted @ 2012-12-23 00:26 让知识沉淀 阅读(374) 评论(0) 推荐(0) 编辑

2012年12月6日

摘要: Explode.h 1 #ifndef _EXPLODE_H_ 2 #define _EXPLODE_H_ 3 4 #include "Game.h" 5 #include <vector> 6 7 extern LPDIRECT3DTEXTURE9 g_texture; 8 9 //爆炸类10 class CExplode11 {12 public:13 //爆炸帧结构体14 typedef struct tagExplodeFrame15 {16 tagExplodeFrame(int nTotalFrame,int nScreenWidth,... 阅读全文
posted @ 2012-12-06 00:39 让知识沉淀 阅读(418) 评论(0) 推荐(0) 编辑