diff options
Diffstat (limited to 'src/render/Texture.cpp')
| -rw-r--r-- | src/render/Texture.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/render/Texture.cpp b/src/render/Texture.cpp index 6d47c4a8..01b80145 100644 --- a/src/render/Texture.cpp +++ b/src/render/Texture.cpp @@ -19,4 +19,17 @@ CTexture::CTexture(wlr_texture* tex) { } m_vSize = Vector2D(tex->width, tex->height); +} + +void CTexture::destroyTexture() { + if (m_iTexID) { + glDeleteTextures(1, &m_iTexID); + m_iTexID = 0; + } +} + +void CTexture::allocate() { + if (!m_iTexID) { + glGenTextures(1, &m_iTexID); + } }
\ No newline at end of file |
