Over 10 Million Study Resources Now at Your Fingertips

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

Return true and the display mode added the array

virtual bool ValidateDisplayMode(const D3DDISPLAYMODE& Mode ) { return true; }

virtual bool ValidateDevice(const D3DDEVTYPE& Type, const D3DCAPS9& Caps ) { return true; }

virtual bool ValidateDepthStencilFormat(const D3DFORMAT& DepthStencilFormat)

{return true;}

In CGameApp.h we derive a class from the CD3DInitialization class:

class CMyD3DInit : public CD3DInitialize
virtual bool ValidateDisplayMode ( const D3DDISPLAYMODE& Mode );
virtual bool ValidateDevice ( const D3DDEVTYPE& Type, const D3DCAPS9& Caps ); virtual bool ValidateVertexProcessingType ( const VERTEXPROCESSING_TYPE& Type ); };



above example, a 320x200 video mode would be rejected and thus not be added to the CD3DInitialize database.


The last function we override in our demo is the ValidateVertexProcessingType. It allows us to reject any devices that do not support the required vertex processing support (eg. hardware transformation and lighting). It can also be used to remove unnecessary processing types. For example, our application does not need a device that supports mixed vertex processing.

bool CMyD3DInit::ValidateVertexProcessingType( const VERTEXPROCESSING_TYPE &Type ) {
// Test Type ( We don't need mixed )
if ( Type == MIXED_VP ) return false;

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Make payment
Document download
Download File
PageId: ELI4B8E9E2
Uploaded by :
Page 1 Preview
return true and the display mode added the array
Sell Your Old Documents & Earn Wallet Balance