diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 549bb74604..f1ae8c1f4c 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -546,8 +546,20 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B mWindow = SDL_CreateWindow( mWindowTitle.c_str(), SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, mSDLFlags ); if( mWindow ) + { + mContext = SDL_GL_CreateContext( mWindow ); + + if( mContext == 0 ) + { + LL_WARNS() << "Cannot create GL context " << SDL_GetError() << LL_ENDL; + setupFailure("GL Context creation error creation error", "Error", OSMB_OK); + return FALSE; + } + // SDL_GL_SetSwapInterval(1); mSurface = SDL_GetWindowSurface( mWindow ); - + } + + if( mFullscreen ) { if (mSurface) @@ -599,20 +611,6 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B bmpsurface = NULL; } - char const *pEnv = getenv("FS_NO_SDL_CREATE_CONTEXT" ); - if( pEnv == nullptr || std::string( pEnv ) == "1" ) - { - mContext = SDL_GL_CreateContext( mWindow ); - - if( mContext == 0 ) - { - LL_WARNS() << "Cannot create GL context " << SDL_GetError() << LL_ENDL; - raise(SIGTRAP); - return FALSE; - } - // SDL_GL_SetSwapInterval(1); - } - // Detect video memory size. # if LL_X11 gGLManager.mVRAM = x11_detect_VRAM_kb() / 1024;