void gep::Renderer::destroy() { m_pDummyTexture = nullptr; m_pDummyShader = nullptr; m_pDummyModel = nullptr; DELETE_AND_NULL(m_pFontBuffer); DELETE_AND_NULL(m_pLinesBuffer); DELETE_AND_NULL(m_pLines2DBuffer); GEP_RELEASE_AND_NULL(m_pRenderTargetView); GEP_RELEASE_AND_NULL(m_pDepthStencilView); GEP_RELEASE_AND_NULL(m_pSwapChain); if(m_pDeviceContext) { m_pDeviceContext->ClearState(); m_pDeviceContext->Flush(); m_pDeviceContext->Release(); m_pDeviceContext = nullptr; } if(m_pd3dDevice) { m_pd3dDevice->Release(); m_pd3dDevice = nullptr; } destroyWindow(); const GUID DXGI_DEBUG_ALL2 = { 0xe48ae283, 0xda80, 0x490b, { 0x87, 0xe6, 0x43, 0xe9, 0xa9, 0xcf, 0xda, 0x8 } }; delete m_pDebugRenderer; m_pDebugRenderer = nullptr; #ifdef _DEBUG //ComLeakFinder::destroyInstance(); auto handle = GetModuleHandle(L"dxgidebug.dll"); if(handle != INVALID_HANDLE_VALUE) { auto fun = reinterpret_cast<decltype(&DXGIGetDebugInterface)>(GetProcAddress(handle, "DXGIGetDebugInterface")); if (fun) // TODO FIXME: "DXGIGetDebugInterface" not found on certain systems { IDXGIDebug* pDebug = nullptr; fun(__uuidof(IDXGIDebug), (void**)&pDebug); if (pDebug) { pDebug->ReportLiveObjects(DXGI_DEBUG_ALL2, DXGI_DEBUG_RLO_ALL); } } } #endif }
void gep::AnimationFactory::destroy() { for(auto& skeleton : m_Skeletons) { DELETE_AND_NULL(skeleton); } for(auto& animControl : m_AnimationControls) { DELETE_AND_NULL(animControl); } }
void gpp::GameObjectManager::destroy() { for(auto& gameObject : m_gameObjects.values()) { gameObject->destroy(); DELETE_AND_NULL(gameObject); } m_gameObjects.clear(); }
gep::HavokRigidBody::~HavokRigidBody() { DELETE_AND_NULL(m_shape); }
void gep::CollisionMesh::unload() { DELETE_AND_NULL(m_pShape); }
{ m_pCamera->setPosition(m_transform.getWorldPosition()); if(m_viewTarget.getParent() != gep::getIdentityTransform()) { lookAt(m_viewTarget.getWorldPosition()); } if(m_upTarget.getParent() != gep::getIdentityTransform()) { m_pCamera->setUpVector(m_upTarget.getUpDirection()); } } void gpp::CameraComponent::destroy() { DELETE_AND_NULL(m_pCamera) } void gpp::CameraComponent::setPosition(const gep::vec3& pos) { m_transform.setPosition(pos); m_pCamera->setPosition(m_transform.getWorldPosition()); } void gpp::CameraComponent::setRotation(const gep::Quaternion& rot) { m_transform.setRotation(rot); m_pCamera->setRotation(m_transform.getWorldRotation()); } gep::vec3 gpp::CameraComponent::getWorldPosition() const
GOrgueTremulant::~GOrgueTremulant() { DELETE_AND_NULL(m_TremProvider); }