Skip to content

Commit

Permalink
Applied a part of gorzuate's patch for OSX compilation
Browse files Browse the repository at this point in the history
Made the GL calls be done after SDL_SetVideoMode() as it seemed to be
needed on mac.

Also tested it on Windows and Linux.
  • Loading branch information
Yohann Ferreira authored and Yohann Ferreira committed Jan 29, 2013
1 parent e182d83 commit 4ab42dd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/engine/video/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,16 +425,6 @@ bool VideoEngine::ApplySettings()
IF_PRINT_WARNING(VIDEO_DEBUG) << "failed to delete OpenGL textures during a context change" << std::endl;
}

// Clear GL state
DisableBlending();
DisableTexture2D();
DisableAlphaTest();
DisableStencilTest();
DisableScissoring();
DisableVertexArray();
DisableColorArray();
DisableTextureCoordArray();

int32 flags = SDL_OPENGL;

if(_temp_fullscreen == true) {
Expand Down Expand Up @@ -478,6 +468,16 @@ bool VideoEngine::ApplySettings()
}
}

// Clear GL state, after SDL_SetVideoMode() for OSX compatibility
DisableBlending();
DisableTexture2D();
DisableAlphaTest();
DisableStencilTest();
DisableScissoring();
DisableVertexArray();
DisableColorArray();
DisableTextureCoordArray();

// Turn off writing to the depth buffer
glDepthMask(GL_FALSE);

Expand Down

0 comments on commit 4ab42dd

Please sign in to comment.