Skip to content

Commit 1f31232

Browse files
committed
Made position and index arrays static
1 parent 041fe1b commit 1f31232

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ bool RenderView(const Context::ProgramInfo& programInfo, const XrCompositionLaye
11211121
float radius = 1.5f;
11221122
float portalRadius = radius / 3.0f;
11231123
const int NUM_VERTICES = 54;
1124-
float positions[NUM_VERTICES * 3] = {
1124+
static float positions[NUM_VERTICES * 3] = {
11251125
// room bounds
11261126
radius, 0.0f, radius,
11271127
radius, 0.0f, -radius,
@@ -1203,7 +1203,7 @@ bool RenderView(const Context::ProgramInfo& programInfo, const XrCompositionLaye
12031203
glEnableVertexAttribArray(programInfo.positionAttribLoc);
12041204

12051205
const int NUM_INDICES = 104;
1206-
uint16_t indices[NUM_INDICES] = {
1206+
static uint16_t indices[NUM_INDICES] = {
12071207
0, 1, 1, 2, 2, 3, 3, 0, // room
12081208
0, 4, 1, 5, 2, 6, 3, 7,
12091209
4, 5, 5, 6, 6, 7, 7, 4,

0 commit comments

Comments
 (0)