Example #1
0
	void Destroy() {
		if (m_texture_storage) {
			for (size_t i = 0; i < countof(m_pool); i++) {
				m_map[i] = NULL;
				m_offset[i] = 0;
				gl_DeleteSync(m_fence[i]);

				// Don't know if we must do it
				gl_BindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pool[i]);
				gl_UnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
			}
			gl_BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
		}
		gl_DeleteBuffers(countof(m_pool), m_pool);
	}
Example #2
0
 GLSLStaticViewer::~GLSLStaticViewer()
 {
     gl_DeleteBuffers(dimension_of(m_VBOIds), m_VBOIds);
     gl_DeleteVertexArrays(dimension_of(m_VAOIds), m_VAOIds);
 }