www.pudn.com > zfxcengine-0.1.0.zip > ceDeviceCaps_D3D9.cpp
#include#include "Core/ceExceptions.h" #include "Render/RenderD3D9/ceDeviceCaps_D3D9.h" #include "Core/ceMemManager.h" namespace ZFXCE { namespace Render { ceDeviceCapsD3D9::ceDeviceCapsD3D9(void) {} /////////////////////////////////////////////////////////////////// ceDeviceCapsD3D9::ceDeviceCapsD3D9(LPDIRECT3DDEVICE9 D3DDevice):m_pD3DDevice(D3DDevice) {} /////////////////////////////////////////////////////////////////// ceDeviceCapsD3D9::~ceDeviceCapsD3D9(void) { m_pD3DDevice = NULL; } /////////////////////////////////////////////////////////////////// void ceDeviceCapsD3D9::GetCaps(void) { assert(m_pD3DDevice != NULL); if(FAILED(m_pD3DDevice->GetDeviceCaps(&m_D3DCaps) ) ) CE_EXCEPTION(std::string(__FUNCTION__)+": Konnte keine D3D DeviceCaps holen!", CELS_ERROR); } /////////////////////////////////////////////////////////////////// BOOL ceDeviceCapsD3D9::SupportsAnisotropicTextures(void) { if(m_D3DCaps.MaxAnisotropy == 1) return FALSE; return TRUE; } /////////////////////////////////////////////////////////////////// BOOL ceDeviceCapsD3D9::SupportsAntialiasing(void) { return FALSE; } /////////////////////////////////////////////////////////////////// BOOL ceDeviceCapsD3D9::SupportsCubeMaps(void) { return TRUE; } /////////////////////////////////////////////////////////////////// BOOL ceDeviceCapsD3D9::SupportsMultitexturing(UINT *Num) { if(m_D3DCaps.MaxSimultaneousTextures == 1) { if(*Num) *Num = 1; return FALSE; } if(*Num) *Num = m_D3DCaps.MaxTextureBlendStages; return TRUE; } /////////////////////////////////////////////////////////////////// BOOL ceDeviceCapsD3D9::SupportsOcclusionQueries(void) { if( D3DERR_NOTAVAILABLE == m_pD3DDevice->CreateQuery( D3DQUERYTYPE_OCCLUSION, NULL ) ) return FALSE; return TRUE; } /////////////////////////////////////////////////////////////////// BOOL ceDeviceCapsD3D9::SupportsPointSprites(void) { return FALSE; } /////////////////////////////////////////////////////////////////// BOOL ceDeviceCapsD3D9::SupportsTextureCompression(void) { return TRUE; } BOOL ceDeviceCapsD3D9::SupportesTwoSidedStenciling(void) { return FALSE; } BOOL ceDeviceCapsD3D9::SupportsDP3TextureOp(void) { return FALSE; } } // namespace Render } // namespace ZFXCE