finish up GL vertex buffer code

This commit is contained in:
jp9000
2013-10-11 11:41:36 -07:00
parent 1b3b177583
commit 0a4592a414
8 changed files with 198 additions and 23 deletions

View File

@@ -116,15 +116,11 @@ void texture_destroy(texture_t tex)
if (!is_texture_2d(tex, "texture_destroy"))
return;
if (tex->is_dynamic && tex2d->unpack_buffer) {
glDeleteBuffers(1, &tex2d->unpack_buffer);
gl_success("glDeleteBuffers");
}
if (tex->is_dynamic && tex2d->unpack_buffer)
gl_delete_buffers(1, &tex2d->unpack_buffer);
if (tex->texture) {
glDeleteTextures(1, &tex->texture);
gl_success("glDeleteTextures");
}
if (tex->texture)
gl_delete_textures(1, &tex->texture);
bfree(tex);
}