diff options
author | Chris Xiong <chirs241097@gmail.com> | 2018-02-06 00:00:23 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2018-02-06 00:00:23 +0800 |
commit | dc2ec44f4c1ee977c0a911d6c343e15a9729e4e7 (patch) | |
tree | 50efe57b645e37f9df1690957ef2e16133aeedee /smelt/glfw_m | |
parent | c741895e45968b50114a1b6ec0307503bce59783 (diff) | |
download | SMELT-dc2ec44f4c1ee977c0a911d6c343e15a9729e4e7.tar.xz |
Remove nonsense.
Documentation work in progress.
Diffstat (limited to 'smelt/glfw_m')
-rw-r--r-- | smelt/glfw_m/gfx_glfw.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/smelt/glfw_m/gfx_glfw.cpp b/smelt/glfw_m/gfx_glfw.cpp index 41b4d7b..4f69a40 100644 --- a/smelt/glfw_m/gfx_glfw.cpp +++ b/smelt/glfw_m/gfx_glfw.cpp @@ -907,21 +907,18 @@ void SMELT_IMPL::finiOGL() delete[] indexBuf;indexBuf=NULL; if(pOpenGLDevice) { - if(1) + if(VertexBufferObject!=0) { - if(VertexBufferObject!=0) - { - glBindVertexArray(VertexArrayObject); - glBindBuffer(GL_ARRAY_BUFFER,0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); - glDeleteBuffers(1,&VertexBufferObject); - glDeleteBuffers(1,&IndexBufferObject); - glBindVertexArray(0); - glDeleteVertexArrays(1,&VertexArrayObject); - VertexArrayObject=0; - VertexBufferObject=0; - IndexBufferObject=0; - } + glBindVertexArray(VertexArrayObject); + glBindBuffer(GL_ARRAY_BUFFER,0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); + glDeleteBuffers(1,&VertexBufferObject); + glDeleteBuffers(1,&IndexBufferObject); + glBindVertexArray(0); + glDeleteVertexArrays(1,&VertexArrayObject); + VertexArrayObject=0; + VertexBufferObject=0; + IndexBufferObject=0; } glDeleteProgram(ShaderProgram); delete pOpenGLDevice; |