diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cube_explosion.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/cube_explosion.c b/tests/cube_explosion.c index ee990a57..3f55b3c6 100644 --- a/tests/cube_explosion.c +++ b/tests/cube_explosion.c @@ -64,8 +64,11 @@ int main(int argc, char *argv[]) // Create a texture GLuint texture; + assert(!glIsTexture(1)); // not a texture glGenTextures( 1, &texture ); + assert(!glIsTexture(texture)); // not a texture until glBindTexture glBindTexture( GL_TEXTURE_2D, texture ); + assert(glIsTexture(texture)); // NOW it is a texture glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); GLubyte textureData[16*16*4]; @@ -223,6 +226,10 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); + assert(glIsTexture(texture)); // still a texture + glDeleteTextures(1, &texture); + assert(!glIsTexture(texture)); // but not anymore + verify(); #if !EMSCRIPTEN |