Skip to content

Commit

Permalink
Silence Apple GL deprecation warnings and cleanup gl context on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ensiform committed May 1, 2024
1 parent 8917c69 commit 30b4aec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/renderer/qgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ If you have questions concerning this license or the applicable additional terms
#include <GL/gl.h>
#include <GL/glx.h>
#elif defined(__APPLE__)
#define GL_SILENCE_DEPRECATION
#include <OpenGL/gl.h>
#endif

Expand Down
7 changes: 7 additions & 0 deletions src/sdl/sdl_glimp.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ void GLimp_Shutdown( qboolean unloadDLL )
{
IN_Shutdown();

// Destroy existing state if it exists
if ( SDL_glContext != NULL )
{
SDL_GL_DeleteContext( SDL_glContext );
SDL_glContext = NULL;
}

SDL_DestroyWindow( SDL_window );
SDL_window = NULL;

Expand Down

0 comments on commit 30b4aec

Please sign in to comment.