Преглед на файлове

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


Зареждане…
Отказ
Запис