Advanced 3D Game Programming with DirectX - phần 1 doc
... 5 - 3D Math Foundations Chapter 6 - Artificial Intelligence Chapter 7 - UDP Networking Chapter 8 - Beginning Direct3D Chapter 9 - Advanced 3D Programming Chapter 10 - Advanced ... DirectX 9.0 Introduction Chapter 1 - Windows Chapter 2 - Getting Started with DirectX Chapter 3 - Communicating with D...
Ngày tải lên: 08/08/2014, 23:20
... back buffer d3dpp.BackBufferWidth = width; d3dpp.BackBufferHeight = height; // Set the flags for the bit depth - only supports 1 6-, 2 4-, and 32-bit formats if( bpp == 16 ) d3dpp.BackBufferFormat ... available r = m_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, m_hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &m_pDevice ); if( FAILED(r))...
Ngày tải lên: 08/08/2014, 23:20
... to a D3DMATRIX pointer, as they are laid out in memory the same way. Listing 8.4: The D3DMATRIX structure typedef struct _D3DMATRIX { D3DVALUE _11 , _12 , _13 , _14 ; D3DVALUE _ 21, _22, ... struct _D3DVECTOR { union { D3DVALUE x; D3DVALUE dvX; }; union { D3DVALUE y; D3DVALUE dvY; }; union { D3DVALUE z; D3DVALUE dvZ; }; } D3DVECTOR, *LPD3DVECTOR; D3DMA...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 3 pot
... [6]: Hi-Hat\n"; // Tell Direct3D we are about to start rendering Graphics( )-& gt;GetDevice( )-& gt;BeginScene(); // Output the text Graphics( )-& gt;DrawTextString( 1, 1, D3DCOLOR_XRGB( ... /******************************************************************* * Advanced 3D Game Programming using DirectX 9.0 14 4 hwnd Handle to the window to be associat...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 4 ppsx
... axis.z; _11 = x*x* ( 1- c)+c; _ 21 = x*y* ( 1- c )-( z*s); _ 31 = x*z* ( 1- c)+(y*s); _ 41 = 0; _12 = y*x* ( 1- c)+(z*s); _22 = y*y* ( 1- c)+c; _32 = y*z* ( 1- c )-( x*s); _42 = 0; _13 = z*x* ( 1- c )-( y*s); ... = in.GetLoc(); _ 41 = -( temp.x * in. _11 + temp.y * in. _12 + temp.z * in. _13 ); _42 = -( temp.x * in._ 21 + temp.y * in._22 + temp.z * i...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 5 pptx
... "Health (0 1) " INPUT healthInv " ;1 - Health (0 1) " INPUT ammo "Ammo (0 1) " INPUT ammoInv " ;1 - Ammo (0 1) " INPUT enemy "Proximity to enemy (0 1) " ... stored with bits 0-7 representing the values 2 0 -2 7 and bits 8 -1 5 representing values 2 8 -2 15 . But the CPU in a big endian system stores same va...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 7 ppsx
... 435 // 15 -bit depth buffer and 1- bit stencil d3dpp.AutoDepthStencilFormat = D3DFMT_D15S1; else // 16 -bit depth buffer and no stencil d3dpp.AutoDepthStencilFormat = D3DFMT_D16; } ... for the bit depth - only supports 1 6-, 2 4-, and 32-bit formats if( bpp == 16 ) d3dpp.BackBufferFormat = D3DFMT_R5G6B5; else if( bpp == 24 ) d3dpp.BackBufferFormat = D3DFMT...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 8 ppsx
... out += ( -1 .f /16 .f) * GetOtherVert( other[0], m_v [1] , m_v[0] )-& gt;m_vert.loc; out += ( -1 .f /16 .f) * GetOtherVert( other [1] , m_v[0], m_v [1] )-& gt;m_vert.loc; out += ( -1 .f /16 .f) * GetOtherVert( ... 9 .12 : Sample from the radiosity data file # this is a more complex data set 26 # top of the room, very reflective 0.0 0.0 0.0 0.76 ## -1 0.0 10...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 9 pot
... pDevice->SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_TEXTURE ); pDevice->SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_CURRENT ); pDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_ADDSIGNED ... pDevice->SetTextureStageState( 1, COLORARG1, D3DTA_TEXTURE ); pDevice->SetTextureStageState( 1, COLORARG2, D3DTA_CURRENT ); pDevice->SetTextureStageState(...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 10 potx
... mapping, 45 6-4 58 Direct3D application, 6 6-6 9 DirectInput application, 11 4 -1 18 DirectSound application, 11 4 -1 18 Hello World, 7 -1 0 inverse kinematics, 35 2-3 54 Mobots Attack!, 50 6-5 12 modified ... 31 0-3 14 limit surface, 376 lines, clipping, 14 4 -1 45 link ping, 278 listeners, 78 little endian, 24 5-2 46 local coordinate spa...
Ngày tải lên: 08/08/2014, 23:20