Canvas::~Canvas() { if( NonLegacyRenderer::IsAvailable() ) { CheckGLError( GLEXT_glDeleteVertexArrays( 1, &m_vao ) ); CheckGLError( GLEXT_glDeleteBuffers( 1, &m_vbo ) ); } if( m_display_list ) { CheckGLError( glDeleteLists( m_display_list, 1 ) ); } }
NonLegacyRenderer::~NonLegacyRenderer() { DestroyFBO(); CheckGLError( GLEXT_glDeleteBuffers( 1, &m_index_vbo ) ); CheckGLError( GLEXT_glDeleteBuffers( 1, &m_texture_vbo ) ); CheckGLError( GLEXT_glDeleteBuffers( 1, &m_color_vbo ) ); CheckGLError( GLEXT_glDeleteBuffers( 1, &m_vertex_vbo ) ); CheckGLError( GLEXT_glDeleteVertexArrays( 1, &m_vao ) ); }