mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-30 12:35:42 -04:00
GPU/OpenGL: Clean up VAOs at shutdown time
These were leaking before.
This commit is contained in:
parent
152b56c8cc
commit
05e6d4c401
@ -11,7 +11,14 @@ GPU_HW_OpenGL::GPU_HW_OpenGL() : GPU_HW() {}
|
|||||||
|
|
||||||
GPU_HW_OpenGL::~GPU_HW_OpenGL()
|
GPU_HW_OpenGL::~GPU_HW_OpenGL()
|
||||||
{
|
{
|
||||||
// TODO: Destroy objects...
|
// Destroy objects which don't have destructors to clean them up
|
||||||
|
if (m_vao_id != 0)
|
||||||
|
glDeleteVertexArrays(1, &m_vao_id);
|
||||||
|
if (m_attributeless_vao_id != 0)
|
||||||
|
glDeleteVertexArrays(1, &m_attributeless_vao_id);
|
||||||
|
if (m_texture_buffer_r16ui_texture != 0)
|
||||||
|
glDeleteTextures(1, &m_texture_buffer_r16ui_texture);
|
||||||
|
|
||||||
if (m_host_display)
|
if (m_host_display)
|
||||||
{
|
{
|
||||||
m_host_display->SetDisplayTexture(nullptr, 0, 0, 0, 0, 0, 0, 1.0f);
|
m_host_display->SetDisplayTexture(nullptr, 0, 0, 0, 0, 0, 0, 1.0f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user