X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Finit.cpp;h=2c1c73ad6155e0aae9654f9fa9a58f6c93477fe2;hb=6af76d9e1a6499ebdab405c1d679d24b9e19fded;hp=4772898fb364119cb53f469b32984c445bf0e722;hpb=ea1ce7b0fb7709ae56977480821ac96a231a0686;p=blank.git diff --git a/src/init.cpp b/src/init.cpp index 4772898..2c1c73a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -62,10 +62,6 @@ InitGL::InitGL() { } } -InitGL::~InitGL() { - -} - Window::Window() : handle(SDL_CreateWindow( @@ -142,6 +138,19 @@ void GLContext::EnableVSync() { } } +void GLContext::EnableDepthTest() { + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LESS); +} + +void GLContext::EnableBackfaceCulling() { + glEnable(GL_CULL_FACE); +} + +void GLContext::Clear() { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); +} + InitGLEW::InitGLEW() { glewExperimental = GL_TRUE; @@ -158,8 +167,4 @@ InitGLEW::InitGLEW() { } } -InitGLEW::~InitGLEW() { - -} - }