#include "stdafx.h" #include "KDeviceManager.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //KDeviceManager Implement /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// KDeviceManager * KDeviceManager::m_pDeviceManager = NULL; KDeviceManager::KDeviceManager() { } KDeviceManager::~KDeviceManager() { Clear(); } void KDeviceManager::Clear() { SAFE_DELETE(m_pRenderDevice); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //KDeviceManagerDX Implement /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void KDeviceManagerDX::Initialize(HWND hWnd, HINSTANCE hInst, const K3DRenderDeviceDX::CS & cs) { static KDeviceManagerDX mgr(hWnd,hInst,cs); SetDeviceManager(&mgr); } KDeviceManagerDX::KDeviceManagerDX(HWND hWnd, HINSTANCE hInst, const K3DRenderDeviceDX::CS & cs) { m_hWnd = hWnd; m_hInst = hInst; K3DRenderDeviceDX * pRenderDevice = new K3DRenderDeviceDX; if( !pRenderDevice->Create(cs) ) { /*if( pRenderDevice->GetCaps().VertexShaderVersion < D3DPS_VERSION(2,0) || pRenderDevice->GetCaps().PixelShaderVersion < D3DPS_VERSION(2,0) ) { MessageBox( m_hWnd, "Graphic Card.......", "Rappelz-Error", MB_OK ); } else*/ { MessageBox( m_hWnd, "RenderDevice Create Error", "Rappelz-Error", MB_OK ); } } m_pRenderDevice = pRenderDevice; }