label: destroy texture (#230)

* label: destroy texture

* misc: gitignore
This commit is contained in:
Maximilian Seidler 2024-03-26 00:37:36 +00:00 committed by GitHub
parent 87fce7923f
commit 6acb7552a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 1 deletions

6
.gitignore vendored
View file

@ -1,4 +1,8 @@
.cache
.direnv
.envrc
.vscode/ .vscode/
build/ build/
protocols/*.h compile_commands.json
protocols/*.c protocols/*.c
protocols/*.h

View file

@ -4,6 +4,10 @@ CTexture::CTexture() {
// naffin' // naffin'
} }
CTexture::~CTexture() {
destroyTexture();
}
void CTexture::destroyTexture() { void CTexture::destroyTexture() {
if (m_bAllocated) { if (m_bAllocated) {
glDeleteTextures(1, &m_iTexID); glDeleteTextures(1, &m_iTexID);

View file

@ -13,6 +13,7 @@ enum TEXTURETYPE {
class CTexture { class CTexture {
public: public:
CTexture(); CTexture();
~CTexture();
void destroyTexture(); void destroyTexture();
void allocate(); void allocate();