Skip to content

Commit d2ddc11

Browse files
committed
32_gl_interop/main.cpp: fix error and warnings
On linux g++ headers more "clean" and doesn't implicitly include <memory>. Include <memory> header to avoid compilation error GLuint = NUL provides warning at compilation time "warning: converting to non-pointer type". GLuint should be = 0
1 parent 153ac7b commit d2ddc11

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tutorials/32_gl_interop/main.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include <cassert>
4646
#include <iostream>
4747
#include <thread>
48+
#include <memory>
4849

4950
const unsigned int WINDOW_WIDTH = 640;
5051
const unsigned int WINDOW_HEIGHT = 480;
@@ -84,9 +85,9 @@ class GuiRenderImpl
8485
};
8586

8687

87-
GLuint g_vertex_buffer_id = NULL;
88-
GLuint g_index_buffer_id = NULL;
89-
GLuint g_texture = NULL;
88+
GLuint g_vertex_buffer_id = 0;
89+
GLuint g_index_buffer_id = 0;
90+
GLuint g_texture = 0;
9091
rpr_framebuffer g_frame_buffer = NULL;
9192
rpr_context g_context = NULL;
9293
rpr_material_system g_matsys = NULL;

0 commit comments

Comments
 (0)