摘要:
主要代码如下:声明//定义材质D3DMATERIAL9 g_material;//定义光源D3DLIGHT9 g_light;bool InitializeObjects(){// Set the projection matrix.D3DXMatrixPerspectiveFovLH(&g_projection, 45.0f,WINDOW_WIDTH/WINDOW_HEIGHT, 0.1f, 1000.0f);g_D3DDevice->SetTransform(D3DTS_PROJECTION, &g_projection);// Set default renderi 阅读全文
摘要:
声明://Mesh objects 网格对象LPD3DXMESH g_teapot=NULL; LPD3DXMESH g_cube=NULL;LPD3DXMESH g_sphere=NULL;//球体LPD3DXMESH g_torus=NULL;//圆环bool InitializeObjects(){// Set the projection matrix.D3DXMatrixPerspectiveFovLH(&g_projection, 45.0f,WINDOW_WIDTH/WINDOW_HEIGHT, 0.1f, 1000.0f);g_D3DDevice->SetTran 阅读全文
摘要:
创建win32应用程序空工程//main.cpp//time: 01/08/2013#include#include #pragma comment(lib,"d3d9.lib")#pragma comment(lib,"d3dx9.lib")#define WINDOW_CLASS "UGPDX"#define WINDOW_NAME "Template"#define WINDOW_WIDTH 640#define WINDOW_HEIGHT 480bool InitializeD3D(HWND hWnd,bo 阅读全文