void Direct3D_Shutdown() { if (spriteobj) spriteobj->Release(); if (d3ddev) d3ddev->Release(); if (d3d) d3d->Release(); }
void dx9vid_shutdown() { g_screenSprite->Release(); // release the screen sprite g_screenTex->Release(); // release the screen texture d3ddev->Release(); // close and release the 3D device d3d->Release(); // close and release Direct3D }
static void resetAdditions() { if(imagetex) imagetex->Release(); imagetex = NULL; if(sprite) sprite->Release(); sprite = NULL; }
void ShutdownGraphics() { if(spriteHandler) { spriteHandler->Release(); } if(device) { device->Release(); } if(d3d) { d3d->Release(); } }
//----------------------------------------------------------------------------- // Name: Cleanup() // Desc: Releases all previously initialized objects //----------------------------------------------------------------------------- VOID Cleanup() { if (sprite != NULL) sprite->Release(); if( renderDevice != NULL ) renderDevice->Release(); if( g_pD3D != NULL ) g_pD3D->Release(); if( bg != NULL) delete bg; }
void cleanD3d(void) { d3d9VertexBuffer1->Release(); d3d9VertexBuffer2->Release(); if (mesh1 != NULL) mesh1->Release(); if (mesh2 != NULL) mesh2->Release(); if (mesh3 != NULL) mesh3->Release(); if (texture1 != NULL) texture1->Release(); if (texture2 != NULL) texture2->Release(); if (texture3 != NULL) texture3->Release(); if (sprite != NULL) sprite->Release(); if (spriteTexture != NULL) spriteTexture->Release(); if (legendSprite != NULL) legendSprite->Release(); if (legendTexture != NULL) legendTexture->Release(); for (DWORD i = 0; i < numMaterials; i++) // customized cause I use textures from resources if ((i != 1) && (i != 3) && (i != 4) && (i != 6) && planeTexture[i] != NULL) planeTexture[i]->Release(); d3d9dev->Release(); d3d9->Release(); return; }
void TextBox::Render() { LPD3DXSPRITE sprite; D3DXCreateSprite(device, &sprite); sprite->Begin(0); if (!masked) font->DrawText(sprite, (label + text).c_str(), -1, &surface, DT_LEFT|DT_NOCLIP, color); else { std::string mask = ""; for(unsigned int i = 0; i < text.length(); ++i) mask.push_back('*'); font->DrawText(sprite, (label + mask).c_str(), -1, &surface, DT_LEFT|DT_NOCLIP, color); } sprite->End(); sprite->Release(); }