X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Finit.hpp;fp=src%2Finit.hpp;h=0000000000000000000000000000000000000000;hb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;hp=30da3beb1cb33a5284fb2772a570dfcee5180d67;hpb=e53a0e2e711a7d8bd9b0ddacd1360aa14370643f;p=blank.git diff --git a/src/init.hpp b/src/init.hpp deleted file mode 100644 index 30da3be..0000000 --- a/src/init.hpp +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef BLANK_INIT_HPP_ -#define BLANK_INIT_HPP_ - -#include - - -namespace blank { - -class GLContext; - - -class InitSDL { - -public: - InitSDL(); - ~InitSDL(); - - InitSDL(const InitSDL &) = delete; - InitSDL &operator =(const InitSDL &) = delete; - -}; - - -class InitIMG { - -public: - InitIMG(); - ~InitIMG(); - - InitIMG(const InitIMG &) = delete; - InitIMG &operator =(const InitIMG &) = delete; - -}; - - -class InitGL { - -public: - explicit InitGL(bool double_buffer = true, int sample_size = 1); - - InitGL(const InitGL &) = delete; - InitGL &operator =(const InitGL &) = delete; - -}; - - -class Window { - -public: - Window(); - ~Window(); - - Window(const Window &) = delete; - Window &operator =(const Window &) = delete; - - void GrabInput(); - void ReleaseInput(); - - void GrabMouse(); - void ReleaseMouse(); - - GLContext CreateContext(); - - void Flip(); - -private: - SDL_Window *handle; - -}; - - -class GLContext { - -public: - explicit GLContext(SDL_Window *); - ~GLContext(); - - GLContext(GLContext &&); - GLContext &operator =(GLContext &&); - - GLContext(const GLContext &) = delete; - GLContext &operator =(const GLContext &) = delete; - - static void EnableVSync(); - static void EnableDepthTest() noexcept; - static void EnableBackfaceCulling() noexcept; - - static void Clear() noexcept; - static void ClearDepthBuffer() noexcept; - -private: - SDL_GLContext handle; - -}; - - -class InitGLEW { - -public: - InitGLEW(); - - InitGLEW(const InitGLEW &) = delete; - InitGLEW &operator =(const InitGLEW &) = delete; - -}; - -} - -#endif