Euphoria
sdlglcontext.cc
Go to the documentation of this file.
1 #include "window/sdlglcontext.h"
2 
3 #include "log/log.h"
4 
5 #include "window/sdlwindow.h"
6 
7 #include "SDL_video.h"
8 
9 
10 namespace eu::window
11 {
13  : context(SDL_GL_CreateContext(window->window))
14  {
15  if(context == nullptr)
16  {
17  LOG_ERROR("Failed to create GL context {0}", SDL_GetError());
18  return;
19  }
20  }
21 
23  {
24  SDL_GL_DeleteContext(context);
25  }
26 }
#define LOG_ERROR(...)
Definition: log.h:9
SdlOpenglContext(SdlWindow *window)
Definition: sdlglcontext.cc:12