glarea: Fix buffer initialization
authorTimm Bäder <mail@baedert.org>
Wed, 28 Aug 2019 08:05:48 +0000 (10:05 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 9 Sep 2019 15:36:25 +0000 (17:36 +0200)
This only worked when the vao id and the buffer id accidentally matched,
for example when running gtk4-demo with --run=glarea

Fixes #2042

demos/gtk-demo/glarea.c

index eed1e80ec3104c0243eb6d70bdacf8aa0c6b3611..21e88b63aee39fcb2d88e7383ceb7d22aa9b2aa1 100644 (file)
@@ -241,7 +241,7 @@ realize (GtkWidget *widget)
       fragment_path = "/glarea/glarea-gl.fs.glsl";
     }
 
-  init_buffers (&position_buffer, NULL);
+  init_buffers (NULL, &position_buffer);
   init_shaders (vertex_path, fragment_path, &program, &mvp_location);
 }