浏览代码

gl: do not call glDeleteBuffers with a zero-length list, it crashes on

the PS3.
legacy
Sam Hocevar sam 14 年前
父节点
当前提交
28f8fce429
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      src/scene.cpp

+ 4
- 2
src/scene.cpp 查看文件

@@ -92,8 +92,10 @@ Scene::Scene(float angle)
Scene::~Scene()
{
/* FIXME: this must be done while the GL context is still active.
* Change the architecture to make sure of that. */
glDeleteBuffers(data->nbufs, data->bufs);
* Change the code architecture to make sure of that. */
/* XXX: The test is necessary because of a crash with PSGL. */
if (data->nbufs > 0)
glDeleteBuffers(data->nbufs, data->bufs);
#if defined HAVE_GL_2X
glDeleteVertexArrays(1, &data->vao);
#endif


正在加载...
取消
保存