Skip to content

Commit 51b593f

Browse files
committed
Deleted GLContext at program shutdown
1 parent 589ac75 commit 51b593f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ int main(int argc, char *argv[]) {
165165
return 0;
166166
}
167167

168-
SDL_GL_CreateContext(displayWindow);
168+
SDL_GLContext glContext = SDL_GL_CreateContext(displayWindow);
169169

170170
initGame();
171171
initOpenGL();
@@ -182,6 +182,7 @@ int main(int argc, char *argv[]) {
182182
SDL_Delay(100);
183183
}
184184

185+
SDL_GL_DeleteContext(glContext);
185186
SDL_Quit();
186187

187188
return 0;

0 commit comments

Comments
 (0)