Advanced 3D Game Programming with DirectX - phần 2 doc
... set this to D3DFMT_ A8R8G8B8 for 3 2- bit surfaces. For more information, see DirectX 9.0 C++ Documentation /DirectX Graphics/Direct3D C++ Reference/Enumerated Types/D3DFORMAT. 82 { HRESULTr=0; ... standard, full-screen, 640x480, 3 2- bit application: Listing 2. 7: Filling in the D3DPRESENT_PARAMETERS structure D3DPRESENT_PARAMETERS d3dpp; ZeroMemory( &d3dpp, sizeo...
Ngày tải lên: 08/08/2014, 23:20
... 1 Advanced 3D Game Programming with DirectX 9.0 by Peter Walsh ISBN:155 622 96 82 Wordware Publishing © 20 03 ( 525 pages) Designed for programmers who are new to graphics and game programming, ... 5 - 3D Math Foundations Chapter 6 - Artificial Intelligence Chapter 7 - UDP Networking Chapter 8 - Beginning Direct3D Chapter 9 - A...
Ngày tải lên: 08/08/2014, 23:20
... struct _D3DVECTOR { union { D3DVALUE x; D3DVALUE dvX; }; union { D3DVALUE y; D3DVALUE dvY; }; union { D3DVALUE z; D3DVALUE dvZ; }; } D3DVECTOR, *LPD3DVECTOR; D3DMATRIX ... 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 , _2...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 3 pot
... * Advanced 3D Game Programming using DirectX 9.0 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Desc: Sample application for Direct3D * * copyright (c) 20 02 by ... * Advanced 3D Game Programming using DirectX 9.0 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Desc: Sample application for Direct3D * * copy...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 4 ppsx
... _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); _23 = z*y*(1-c)+(x*s); ... = in._11; _ 12 = in. _21 ; _13 = in._31; _21 = in._ 12; _22 = in. _22 ; _23 = in._ 32; _31 = in._13; _ 32 = in. _23 ; _33 = in._33; // fix right column _14...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 5 pptx
... whole number that takes up 2 bytes. In a little endian system, the bytes are 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 ... endian system stores same value the other way around with bits 0-7 representing values 2 8 -2 15 and bits 8-1 5 representing values 2 0 -2 7 . 29 7 }...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 7 ppsx
... - only supports 1 6-, 2 4-, and 3 2- bit formats if( bpp == 16 ) d3dpp.BackBufferFormat = D3DFMT_R5G6B5; else if( bpp == 24 ) d3dpp.BackBufferFormat = D3DFMT_R8G8B8; else if( bpp == 32 ... texCoord2 m_tex1; texCoord3 m_tex2; static ulong m_fvfFlags; }; ulong mtVertex::m_fvfFlags = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DF...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 8 ppsx
... Graphics( )-& gt;GetDevice( )-& gt;CreateVertexBuffer( m_nVerts * sizeof( sVertex ), D3DUSAGE_WRITEONLY, D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1, D3DPOOL_DEFAULT, &m_pVertexBuffer ); 524 This ... pOther = m_v[prim ]-& gt;m_edgeList[i ]-& gt;Other( m_v[prim] ); if( pOther == m_v[sec] ) out += (5.f/ 12. f) * pOther->m_vert.loc; else out += (-1 .f/ 12...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 9 pot
... pDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA ); pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA ); pDevice->DrawPrimitiveUP( 5 92 pDevice->SetTexture( ... TRUE ); pDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA ); pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_ONE ); pDevice->DrawPrimitiveUP( D3DPT_TRIANGLEST...
Ngày tải lên: 08/08/2014, 23:20
Advanced 3D Game Programming with DirectX - phần 10 potx
... 681 motivation, 20 4 , 22 4 motor skills, 20 4 MSG structure, 5 MTUDP, 25 1 classes, 26 1 -2 67 , 27 4 -2 75, 27 9 -2 82 functions, 25 5 -2 61 , 26 8 -2 74, 27 5 -2 79 MTUDP(), 25 6 MTUDPMSGTYPE, 27 1 -2 72 multipass, ... multithreading, 25 0 -2 51 mutexes, 25 2- 2 54 N nameless struct, 123 network models, 24 7 -2 48 network play, implementing,...
Ngày tải lên: 08/08/2014, 23:20