PostProcess::~PostProcess() { DestroyVBO(); DestroyFBO(); if (m_pOutputTexture != 0) delete m_pOutputTexture; DestroyBlitShader(); }
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 ) ); }
void Terminate() { glDeleteVertexArrays(1, &cubeVAO); DestroyFBO(); glDeleteBuffers(1, &cubeIBO); glDeleteBuffers(1, &cubeVBO); textureShader.Destroy(); basicShader.Destroy(); }
void PostProcess::Resize(int w, int h) { m_nScreenW = w; m_nScreenH = h; int u2 = 1; int v2 = 1; while(u2 < w) u2 *= 2; while(v2 < h) v2 *= 2; w = u2; h = v2; DestroyFBO(); if (m_pOutputTexture != 0) delete m_pOutputTexture; m_pOutputTexture = new Texture(w, h, Texture::RGBA_24); CreateFBO(w, h); }