Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
setup our vertex fvf code ddevice vertex teamlrn

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

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Joseph Oliver

PageId: ELI9033FCE