aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/gui/sdl/OpenGLRenderer.h
blob: 2db9d68d74f6473f2d5ffb09ad98e104de80599d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include "gl.h"

#include <cru/base/Base.h>

#include <SDL3/SDL_video.h>

namespace cru::platform::gui::sdl {
class SdlWindow;

class SdlOpenGLRenderer {
  CRU_DEFINE_CLASS_LOG_TAG("cru::platform::gui::sdl::SdlOpenGLRenderer")
 public:
  explicit SdlOpenGLRenderer(SdlWindow* window);
  ~SdlOpenGLRenderer();

 private:
  SdlWindow* window_;
  SDL_Window* sdl_window_;
  SDL_WindowID sdl_window_id_;
  SDL_GLContext sdl_gl_context_;
  GladGLContext glad_gl_context_;
};
}  // namespace cru::platform::gui::sdl