Skip to content

Commit

Permalink
- Pulled out commented out code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldicker83 committed Mar 2, 2017
1 parent 55776a1 commit 6361e14
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Renderer/OGL_Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,22 +653,18 @@ void OGL_Renderer::initGL()

void OGL_Renderer::initVideo(unsigned int resX, unsigned int resY, unsigned int bpp, bool fullscreen, bool vsync)
{
// Initialize SDL's Video Subsystems.
if(SDL_Init(SDL_INIT_VIDEO) < 0)
throw Exception(701, "Error starting SDL Video Library", SDL_GetError());

// Setup OpenGL parameters
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
//SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
//SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);

SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); /// \todo Add checks to determine an appropriate depth buffer.
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 4);

if(vsync)
SDL_GL_SetSwapInterval(1);
else
SDL_GL_SetSwapInterval(0);

Uint32 sdlFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;

Expand Down

0 comments on commit 6361e14

Please sign in to comment.