summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwindow/llwindowsdl.cpp31
1 files changed, 7 insertions, 24 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index dd4a7593a3..69332e36b6 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -367,20 +367,14 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b
// Setup default backing colors
GLint redBits{8}, greenBits{8}, blueBits{8}, alphaBits{8};
- GLint depthBits{(bits <= 16) ? 16 : 24}, stencilBits{8};
-
- if (getenv("LL_GL_NO_STENCIL"))
- stencilBits = 0;
+ GLint depthBits{24}, stencilBits{8};
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, redBits);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, greenBits);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, blueBits);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, alphaBits);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, depthBits);
-
- // We need stencil support for a few (minor) things.
- if (stencilBits)
- SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, stencilBits);
+ SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, stencilBits);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
#if LL_DARWIN
@@ -392,17 +386,6 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
- if (LLRender::sGLCoreProfile)
- {
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
- }
-
- // This is requesting a minimum context version
- int major_gl_version = 3;
- int minor_gl_version = 2;
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, major_gl_version);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minor_gl_version);
-
U32 context_flags = 0;
if (gDebugGL)
{
@@ -417,7 +400,7 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b
{
LL_WARNS() << "Window creation failure. SDL: " << SDL_GetError() << LL_ENDL;
setupFailure("Window creation error", "Error", OSMB_OK);
- return FALSE;
+ return false;
}
// Create the context
@@ -433,7 +416,7 @@ bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, b
{
LL_WARNS() << "Failed to make context current. SDL: " << SDL_GetError() << LL_ENDL;
setupFailure("GL Context failed to set current failure", "Error", OSMB_OK);
- return FALSE;
+ return false;
}
if(mFullscreen)
@@ -788,7 +771,7 @@ bool LLWindowSDL::getVisible()
Uint32 flags = SDL_GetWindowFlags(mWindow);
if (flags & SDL_WINDOW_SHOWN)
{
- result = TRUE;
+ result = true;
}
}
return result;
@@ -828,9 +811,9 @@ bool LLWindowSDL::maximize()
if (mWindow)
{
SDL_MaximizeWindow(mWindow);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool LLWindowSDL::getFullscreen()