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/
build/
compile_commands.json
protocols/*.c
protocols/*.h
protocols/*.c

View file

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

View file

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