X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Finit.cpp;h=061e848e073691af5fcedca51763e4af97c91a80;hb=42dea80c2cffb75a5721d1cbf0cdd6277f4d520d;hp=40f76de50ef06eed4995f065013fd1a2a135c23d;hpb=59fe611e6ee06f8e9445f1b19339a1f158c9322c;p=blank.git diff --git a/src/init.cpp b/src/init.cpp index 40f76de..061e848 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -62,10 +62,6 @@ InitGL::InitGL() { } } -InitGL::~InitGL() { - -} - Window::Window() : handle(SDL_CreateWindow( @@ -142,10 +138,23 @@ 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); +} + +void GLContext::ClearDepthBuffer() { + glClear(GL_DEPTH_BUFFER_BIT); +} + InitGLEW::InitGLEW() { glewExperimental = GL_TRUE; @@ -162,8 +171,4 @@ InitGLEW::InitGLEW() { } } -InitGLEW::~InitGLEW() { - -} - }