A 2D tile-based sandbox game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Window.h 309B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <SDL.h>
  3. #include <stdint.h>
  4. #include "util.h"
  5. namespace Cygnet {
  6. class Window {
  7. public:
  8. Window(const char *name, int width, int height);
  9. ~Window();
  10. void makeCurrent();
  11. void clear();
  12. void flip();
  13. private:
  14. CPtr<SDL_Window, SDL_DestroyWindow> win_;
  15. SDL_GLContext glctx_;
  16. };
  17. }