Example #1
0
  void BeforeCoreSystemsShutdown() override
  {
    // make sure that no textures are continue to be streamed in while the engine shuts down
    ezResourceManager::EngineAboutToShutdown();

    ezRenderContext::DeleteConstantBufferStorage(m_hSampleConstants);
    m_hSampleConstants.Invalidate();

    m_pDevice->DestroyTexture(m_hDepthStencilTexture);
    m_hDepthStencilTexture.Invalidate();

    m_hMaterial.Invalidate();
    m_hQuadMeshBuffer.Invalidate();

    // tell the engine that we are about to destroy window and graphics device,
    // and that it therefore needs to cleanup anything that depends on that
    ezStartup::ShutdownHighLevelSystems();

    m_pDevice->DestroyRasterizerState(m_hRasterizerState);
    m_pDevice->DestroyDepthStencilState(m_hDepthStencilState);

    // now we can destroy the graphics device
    m_pDevice->Shutdown();

    EZ_DEFAULT_DELETE(m_pDevice);

    // finally destroy the window
    m_pWindow->Destroy();
    EZ_DEFAULT_DELETE(m_pWindow);
  }
Example #2
0
  FolderType::~FolderType()
  {
    for (ezUInt32 i = 0; i < m_Readers.GetCount(); ++i)
      EZ_DEFAULT_DELETE(m_Readers[i]);

    for (ezUInt32 i = 0; i < m_Writers.GetCount(); ++i)
      EZ_DEFAULT_DELETE(m_Writers[i]);
  }
Example #3
0
 Mesh::~Mesh()
 {
   for (auto it = m_VertexDataStreams.GetIterator(); it.IsValid(); ++it)
   {
     EZ_DEFAULT_DELETE(it.Value());
   }
 }
Example #4
0
void ezVisualizerAdapterRegistry::ClearAdapters(const ezDocument* pDocument)
{
  for (auto& adapt : m_DocumentAdapters[pDocument].m_Adapters)
  {
    EZ_DEFAULT_DELETE(adapt);
  }

  m_DocumentAdapters[pDocument].m_Adapters.Clear();
}
Example #5
0
  ezDataDirectoryType* FolderType::Factory(const char* szDataDirectory)
  {
    FolderType* pDataDir = EZ_DEFAULT_NEW(FolderType);

    if (pDataDir->InitializeDataDirectory(szDataDirectory) == EZ_SUCCESS)
      return pDataDir;

    EZ_DEFAULT_DELETE(pDataDir);
    return NULL;
  }
Example #6
0
  void FolderType::RemoveDataDirectory()
  {
    for (ezUInt32 i = 0; i < m_Readers.GetCount(); ++i)
    {
      EZ_ASSERT(!m_Readers[i]->m_bIsInUse, "Cannot remove a data directory while there are still files open in it.");
    }

    for (ezUInt32 i = 0; i < m_Writers.GetCount(); ++i)
    {
      EZ_ASSERT(!m_Writers[i]->m_bIsInUse, "Cannot remove a data directory while there are still files open in it.");
    }

    FolderType* pThis = this;
    EZ_DEFAULT_DELETE(pThis);
  }
Example #7
0
void ezVariant::Release()
{
  if (m_bIsShared)
  {
    if (m_Data.shared->m_uiRef.Decrement() == 0)
    {
      EZ_DEFAULT_DELETE(m_Data.shared);
    }
  }
  else if (IsValid())
  {
    DestructFunc destructFunc;
    destructFunc.m_pThis = this;

    DispatchTo(destructFunc, GetType());
  }
}
Example #8
0
Scene::~Scene(void)
{
  EZ_DEFAULT_DELETE(m_pVoxelTerrain);
  EZ_DEFAULT_DELETE(m_pBackground);
}
Example #9
0
Level::~Level()
{
  EZ_DEFAULT_DELETE(m_pWorld);
}
Example #10
0
void ezInputManager::DeallocateInternals()
{
  EZ_DEFAULT_DELETE(s_pData);
}
Example #11
0
void ezReloadableVariableBase::Shutdown()
{
  EZ_DEFAULT_DELETE(s_StoredVariables);
  s_StoredVariables = NULL;
}