16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 20:39:18 +02:00

fix delete conditions of gl resources as they are initialized to -1

This commit is contained in:
milek7
2022-04-08 02:03:59 +02:00
parent 670af731bc
commit 32078ac8d8
3 changed files with 10 additions and 10 deletions

View File

@@ -16,9 +16,9 @@ http://mozilla.org/MPL/2.0/.
opengl_precipitation::~opengl_precipitation() {
if( m_vertexbuffer != 0 ) { ::glDeleteBuffers( 1, &m_vertexbuffer ); }
if( m_indexbuffer != 0 ) { ::glDeleteBuffers( 1, &m_indexbuffer ); }
if( m_uvbuffer != 0 ) { ::glDeleteBuffers( 1, &m_uvbuffer ); }
if( m_vertexbuffer != -1 ) { ::glDeleteBuffers( 1, &m_vertexbuffer ); }
if( m_indexbuffer != -1 ) { ::glDeleteBuffers( 1, &m_indexbuffer ); }
if( m_uvbuffer != -1 ) { ::glDeleteBuffers( 1, &m_uvbuffer ); }
}
void