Over 10 Million Study Resources Now at Your Fingertips


Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Language:EN
Pages: 2

Setup our vertex fvf code ddevice- vertex teamlrn

m_TextureFormat = D3DFMT_DXT1;
else
if(SUCCEEDED(m_pD3D->CheckDeviceFormat(Ordinal, Type, AFormat, 0,
D3DRTYPE_TEXTURE, D3DFMT_X8R8G8B8 ))) m_TextureFormat = D3DFMT_X8R8G8B8;
else
if(SUCCEEDED(m_pD3D->CheckDeviceFormat(Ordinal, Type, AFormat, 0,
D3DRTYPE_TEXTURE, D3DFMT_R5G6B5 )) ) m_TextureFormat = D3DFMT_R5G6B5;
else

if(SUCCEEDED(m_pD3D->CheckDeviceFormat(Ordinal, Type, AFormat, 0,
D3DRTYPE_TEXTURE, D3DFMT_X1R5G5B5 )) ) m_TextureFormat = D3DFMT_X1R5G5B5;

else

if ( SUCCEEDED( m_pD3D->CheckDeviceFormat( Ordinal, Type, AFormat, 0,
D3DRTYPE_TEXTURE, D3DFMT_A1R5G5B5))) m_AlphaFormat = D3DFMT_A1R5G5B5;

TeamLRN

CGameApp::SetupRenderStates
The only other function that has changed in the CGameApp class from Lab Project 5.2 is CGameApp::SetupRenderStates -- called when the device is first created or reset. The function now calls TestDeviceCaps to gather information about supported texture formats, filter types, etc. Then it sets up the render states we have come to expect. We set an ambient light level, enable lighting, enable specular highlights, and the Z-Buffer.

// Set up sampler states.

m_pD3DDevice->SetSamplerState( 0, D3DSAMP_MINFILTER , m_MinFilter ); m_pD3DDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER , m_MagFilter ); m_pD3DDevice->SetSamplerState( 0, D3DSAMP_MIPFILTER , m_MipFilter ); m_pD3DDevice->SetSamplerState( 0, D3DSAMP_MAXANISOTROPY, m_Anisotropy );

// Setup our vertex FVF code
m_pD3DDevice->SetFVF( VERTEX_FVF );

TeamLRN

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Payment
Make payment
Document download
Download File
PageId: ELI9033FCE
img
Uploaded by :
mVyxPxgq
Page 1 Preview
setup our vertex fvf code ddevice vertex teamlrn
Sell Your Old Documents & Earn Wallet Balance