void TerrainClass::Shutdown() { // Release the texture. ReleaseTexture(); // Release the vertex and index buffer. ShutdownBuffers(); // Release the height map data. ShutdownHeightMap(); return; }
void ModelClass::Shutdown() { // Release the model texture. ReleaseTexture(); // Shutdown the vertex and index buffers. ShutdownBuffers(); // Release the model data. ReleaseModel(); return; }
void CGLView::OnDestroy() { CView::OnDestroy(); BeginGL(); ReleaseTexture(); EndGL(); // TODO: 여기에 메시지 처리기 코드를 추가합니다 ::ReleaseDC(m_hWnd,m_dp.hdc); wglDeleteContext(m_dp.hglrc); }
void DeprecatedTextureClientD3D11::ClearDT() { // An Azure DrawTarget needs to be locked when it gets nullptr'ed as this is // when it calls EndDraw. This EndDraw should not execute anything so it // shouldn't -really- need the lock but the debug layer chokes on this. // // Perhaps this should be debug only. if (mDrawTarget) { LockTexture(); mDrawTarget = nullptr; ReleaseTexture(); } }
// コピー先のテクスチャを準備 void PrepareTexture( uint32_t width, uint32_t height, D3DFORMAT format ) { ReleaseTexture(); backGroundTextureWidth = width; backGroundTextureHeight = height; backGroundTextureFormat = format; HRESULT hr = S_OK; hr = g_D3d9Device->CreateTexture( width, height, 0, D3DUSAGE_RENDERTARGET, format, D3DPOOL_DEFAULT, &backGroundTexture, nullptr ); if( FAILED( hr ) ){ return; } }
void FoliageClass::Shutdown() { // Release the model texture. ReleaseTexture(); // Release the vertex and instance buffers. ShutdownBuffers(); // Release the foliage array. if(m_foliageArray) { delete [] m_foliageArray; m_foliageArray = 0; } return; }
// コピー先のテクスチャを準備 void PrepareTexture( uint32_t width, uint32_t height, DXGI_FORMAT format ) { ReleaseTexture(); ZeroMemory( &backGroundTextureDesc, sizeof(backGroundTextureDesc) ); backGroundTextureDesc.Usage = D3D11_USAGE_DEFAULT; backGroundTextureDesc.Format = format; backGroundTextureDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE; backGroundTextureDesc.Width = width; backGroundTextureDesc.Height = height; backGroundTextureDesc.CPUAccessFlags = 0; backGroundTextureDesc.MipLevels = 1; backGroundTextureDesc.ArraySize = 1; backGroundTextureDesc.SampleDesc.Count = 1; backGroundTextureDesc.SampleDesc.Quality = 0; HRESULT hr = S_OK; hr = g_D3d11Device->CreateTexture2D( &backGroundTextureDesc, nullptr, &backGroundTexture ); if( FAILED( hr ) ){ return; } D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc; ZeroMemory(&srvDesc, sizeof(srvDesc)); switch( format ) { case DXGI_FORMAT_R8G8B8A8_TYPELESS: srvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; break; case DXGI_FORMAT_R16G16B16A16_TYPELESS: srvDesc.Format = DXGI_FORMAT_R16G16B16A16_FLOAT; break; default: srvDesc.Format = format; break; } srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; srvDesc.Texture2D.MipLevels = 1; hr = g_D3d11Device->CreateShaderResourceView( backGroundTexture, &srvDesc, &backGroundTextureSRV ); if( FAILED( hr ) ){ return; } }
bool Node::Destroy() { //Check the Tile State if(e_tile == DESTRUCTIBLE) { //Release the Current Texture and Bounding Box ReleaseTexture(); m_pBox.reset(); m_pBox = 0; //Set the Tile State e_tile = SPACE; m_pTexture = m_pAlt;//Set the texture to the current texture e_node = ACTIVE; return true; } return false; }
/* =============== Cmd_Maps Only relevent for release and pak files. Releases the .bsp files for the maps, and scans all of the files to build a list of all textures used, which are then released. =============== */ void Cmd_Maps(void) { char map[1024]; int i; while (TokenAvailable()) { GetToken(false); sprintf(map, "maps/%s.bsp", token); ReleaseFile(map); if (!g_release) continue; // get all the texture references sprintf(map, "%smaps/%s.bsp", gamedir, token); LoadBSPFileTexinfo(map); for (i = 0; i < numtexinfo; i++) ReleaseTexture(texinfo[i].texture); } }
DemoEntityManager::~DemoEntityManager(void) { // is we are run asynchronous we need make sure no update in on flight. if (m_world) { NewtonWaitForUpdateToFinish (m_world); } glDeleteLists(m_font, 96); ReleaseTexture(m_fontImage); Cleanup (); // destroy the empty world if (m_world) { NewtonDestroy (m_world); m_world = NULL; } dAssert (NewtonGetMemoryUsed () == 0); delete m_context; }
D3D9Texture* UIDirect3D9Window::AllocateTexture(UIImage *Image) { if (!Image || !m_d3dDevice) return NULL; if (m_textureHash.contains(Image)) { m_textureExpireList.removeOne(Image); m_textureExpireList.append(Image); return m_textureHash[Image]; } D3D9Texture *texture = CreateTexture(m_d3dDevice, Image->size()); if (!texture) { LOG(VB_GENERAL, LOG_ERR, "Failed to create Direct3D9 texture."); return NULL; } m_hardwareCacheSize += texture->m_internalDataSize; UpdateTexture(m_d3dDevice, texture, Image); m_textureHash[Image] = texture; m_textureExpireList.append(Image); if (Image->GetState() == UIImage::ImageLoaded) { m_softwareCacheSize -= Image->byteCount(); Image->FreeMem(); } while ((m_hardwareCacheSize > m_maxHardwareCacheSize) && m_textureExpireList.size()) { ReleaseTexture(m_textureExpireList.takeFirst()); } return texture; }
//--------------------------------------------------------------------------------------- // メッシュ解放 //--------------------------------------------------------------------------------------- void ReleaseMesh(MESH *mesh) { if (mesh == NULL) return; if (mesh->vertex) { free(mesh->vertex); mesh->vertex = NULL; } if (mesh->face) { free(mesh->face); mesh->face = NULL; } if (mesh->normal) { free(mesh->normal); mesh->normal = NULL; } if (mesh->index) { free(mesh->index); mesh->index = NULL; } if (mesh->uv) { free(mesh->uv); mesh->uv = NULL; } if (mesh->material) { int i; for (i = 0; i < mesh->mnum; i++) { ReleaseTexture(mesh->material[i].textureID); mesh->material[i].textureID = 0; } free(mesh->material); mesh->material = NULL; } if (mesh->midx) { free(mesh->midx); mesh->midx = NULL; } }
void Font_Destroy(Font *pFont) { ReleaseTexture(pFont->iTexID); Mem_Free(pFont); }
void CloudClass::Shutdown(){ ReleaseTexture(); // Release the vertex and index buffer. ShutdownBuffers(); return; }
void TextureHostDXGID3D11::Unlock() { ReleaseTexture(); }
void BitmapClass::Shutdown(){ ReleaseTexture(); ShutdownBuffers(); }
virtual ~DistortingCallback() { ReleaseTexture(); }
void UIDirect3D9Window::ReleaseAllTextures(void) { while (!m_textureExpireList.isEmpty()) ReleaseTexture(m_textureExpireList.takeFirst()); }
void ModelClass::Shutdown() { ReleaseTexture(); ShutdownBuffers(); }
CRenderTarget::~CRenderTarget() { ReleaseTexture(); }
void BMFont::Clear() { ReleaseTexture(); ReleaseFontData(); return; }
void DeprecatedTextureHostDXGID3D11::Unlock() { ReleaseTexture(); }
void RDX11RenderTargetMgr::Destroy() { ReleaseTexture(); SAFE_RELEASE(pSwapChain); }
CTextureController::~CTextureController(void) { while (TextureList.size()) ReleaseTexture(0); }
HRESULT __stdcall RemoveTexture(std::vector<InputTexture*>* textureList, InputTexture* item) { textureList->erase(std::remove(textureList->begin(), textureList->end(), item), textureList->end()); HR(ReleaseTexture(item)); return S_OK; }