diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake
index 9fd3923bfd9b2448a4edd171a7cf299b43d24127..f2562fdc44b7c476baa554315f0f6a5614c1498b 100644
--- a/indra/cmake/GLEXT.cmake
+++ b/indra/cmake/GLEXT.cmake
@@ -1,10 +1,11 @@
 # -*- cmake -*-
 include(Prebuilt)
+include(SDL2)
 
-if (NOT USESYSTEMLIBS)
+if (NOT USESYSTEMLIBS AND NOT SDL_FOUND)
   if (WINDOWS OR LINUX)
     use_prebuilt_binary(glext)
   endif (WINDOWS OR LINUX)
   use_prebuilt_binary(glh_linear)
   set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
-endif (NOT USESYSTEMLIBS)
+endif ()
diff --git a/indra/cmake/SDL2.cmake b/indra/cmake/SDL2.cmake
index 542f2d9e4cf44b3d3deecf216940979f195a59a6..0519502b1f3837fcad9c5d6149b8f490685d3d3f 100644
--- a/indra/cmake/SDL2.cmake
+++ b/indra/cmake/SDL2.cmake
@@ -8,6 +8,12 @@ else ()
         use_prebuilt_binary(SDL2)
         set (SDL_FOUND TRUE)
         set (SDL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/SDL2)
-        set (SDL_LIBRARIES SDL2)
+        if(WINDOWS)
+            set (SDL_LIBRARIES 
+                debug ${ARCH_PREBUILT_DIRS_DEBUG}/SDL2d.lib
+                optimized ${ARCH_PREBUILT_DIRS_RELEASE}/SDL2.lib)
+        else()
+            set (SDL_LIBRARIES SDL2)
+        endif()
     endif (LINUX)
 endif ()
\ No newline at end of file
diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt
index 2dd49231673e7e3c7e42e90b5f1bdf09f4c86573..b344d0d11b471a1a373fd702be33bef5e8148644 100644
--- a/indra/llrender/CMakeLists.txt
+++ b/indra/llrender/CMakeLists.txt
@@ -4,6 +4,7 @@ project(llrender)
 
 include(00-Common)
 include(OpenGL)
+include(SDL2)
 include(FreeType)
 include(LLCommon)
 include(LLImage)
@@ -110,9 +111,7 @@ add_library (llrender ${llrender_SOURCE_FILES})
 set_target_properties(llrender PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
 
 if (SDL_FOUND)
-  set_property(TARGET llrender
-    PROPERTY COMPILE_DEFINITIONS LL_SDL=1
-    )
+  target_compile_definitions(llrender PUBLIC LL_SDL=1)
 endif (SDL_FOUND)
 
 # Libraries on which this library depends, needed for Linux builds
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index b23ec8e60270616324e2f369bbe5d78efa0bd284..ca30d1d46fd02732708f14ed126afad01cd50b3c 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -54,6 +54,12 @@
 #include "lldxhardware.h"
 #endif
 
+#if LL_SDL
+#include "SDL2/SDL_video.h"
+
+#define GLH_EXT_GET_PROC_ADDRESS SDL_GL_GetProcAddress
+#endif
+
 BOOL gDebugSession = FALSE;
 BOOL gDebugGLSession = FALSE;
 BOOL gHeadlessClient = FALSE;
@@ -299,12 +305,12 @@ PFNGLGETUNIFORMIVARBPROC glGetUniformivARB = NULL;
 PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB = NULL;
 PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer = NULL;
 
-#if LL_WINDOWS
+#if LL_WINDOWS && !LL_SDL
 PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL;
 #endif
 
 // vertex shader prototypes
-#if LL_LINUX
+#if LL_LINUX || LL_SDL
 PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB = NULL;
 PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB = NULL;
 PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB = NULL;
@@ -331,7 +337,7 @@ PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB = NULL;
 PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB = NULL;
 PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB = NULL;
 PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB = NULL;
-#if LL_LINUX
+#if LL_LINUX || LL_SDL
 PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB = NULL;
 PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB = NULL;
 PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB = NULL;
@@ -374,7 +380,7 @@ PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB = NULL;
 PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB = NULL;
 PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB = NULL;
 
-#if LL_WINDOWS
+#if LL_WINDOWS && !LL_SDL
 PFNWGLGETGPUIDSAMDPROC				wglGetGPUIDsAMD = NULL;
 PFNWGLGETGPUINFOAMDPROC				wglGetGPUInfoAMD = NULL;
 PFNWGLSWAPINTERVALEXTPROC			wglSwapIntervalEXT = NULL;
@@ -460,7 +466,7 @@ LLGLManager::LLGLManager() :
 //---------------------------------------------------------------------
 // Global initialization for GL
 //---------------------------------------------------------------------
-#if LL_WINDOWS && !LL_MESA_HEADLESS
+#if LL_WINDOWS && !LL_MESA_HEADLESS && !LL_SDL
 void LLGLManager::initWGL()
 {
 	mHasPBuffer = FALSE;
@@ -519,7 +525,7 @@ bool LLGLManager::initGL()
 
 	stop_glerror();
 
-#if LL_WINDOWS
+#if LL_WINDOWS && !LL_SDL
 	if (!glGetStringi)
 	{
 		glGetStringi = (PFNGLGETSTRINGIPROC) GLH_EXT_GET_PROC_ADDRESS("glGetStringi");
@@ -635,7 +641,7 @@ bool LLGLManager::initGL()
 		S32 old_vram = mVRAM;
 	mVRAM = 0;
 
-#if LL_WINDOWS
+#if LL_WINDOWS && !LL_SDL
 	if (mHasAMDAssociations)
 	{
 		GLuint gl_gpus_count = wglGetGPUIDsAMD(0, 0);
@@ -1065,6 +1071,44 @@ void LLGLManager::initExtensions()
 	mHasOcclusionQuery = FALSE;
 	mHasPointParameters = FALSE;
 	mHasTextureRectangle = FALSE;
+#elif LL_SDL
+	mHasMultitexture = SDL_GL_ExtensionSupported("GL_ARB_multitexture");
+	mHasATIMemInfo = SDL_GL_ExtensionSupported("GL_ATI_meminfo"); //Basic AMD method, also see mHasAMDAssociations
+	mHasNVXMemInfo = SDL_GL_ExtensionSupported("GL_NVX_gpu_memory_info");
+	mHasSeparateSpecularColor = SDL_GL_ExtensionSupported("GL_EXT_separate_specular_color");
+	mHasAnisotropic = SDL_GL_ExtensionSupported("GL_EXT_texture_filter_anisotropic");
+	mHasCubeMap = SDL_GL_ExtensionSupported("GL_ARB_texture_cube_map");
+	mHasARBEnvCombine = SDL_GL_ExtensionSupported("GL_ARB_texture_env_combine");
+	mHasCompressedTextures = SDL_GL_ExtensionSupported("GL_ARB_texture_compression");
+	mHasOcclusionQuery = SDL_GL_ExtensionSupported("GL_ARB_occlusion_query");
+	mHasTimerQuery = SDL_GL_ExtensionSupported("GL_ARB_timer_query");
+	mHasOcclusionQuery2 = SDL_GL_ExtensionSupported("GL_ARB_occlusion_query2");
+	mHasVertexBufferObject = SDL_GL_ExtensionSupported("GL_ARB_vertex_buffer_object");
+	mHasVertexArrayObject = SDL_GL_ExtensionSupported("GL_ARB_vertex_array_object");
+	mHasSync = SDL_GL_ExtensionSupported("GL_ARB_sync");
+	mHasMapBufferRange = SDL_GL_ExtensionSupported("GL_ARB_map_buffer_range");
+	mHasFlushBufferRange = SDL_GL_ExtensionSupported("GL_APPLE_flush_buffer_range");
+    // NOTE: Using extensions breaks reflections when Shadows are set to projector.  See: SL-16727
+    //mHasDepthClamp = SDL_GL_ExtensionSupported("GL_ARB_depth_clamp") || SDL_GL_ExtensionSupported("GL_NV_depth_clamp");
+    mHasDepthClamp = FALSE;
+	// mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad
+	mHasFramebufferObject = SDL_GL_ExtensionSupported("GL_ARB_framebuffer_object");
+	mHassRGBTexture = SDL_GL_ExtensionSupported("GL_EXT_texture_sRGB");
+	mHassRGBFramebuffer = SDL_GL_ExtensionSupported("GL_ARB_framebuffer_sRGB");
+    mHasTexturesRGBDecode = SDL_GL_ExtensionSupported("GL_EXT_texture_sRGB_decode");
+
+	mHasMipMapGeneration = mHasFramebufferObject || mGLVersion >= 1.4f;
+
+	mHasDrawBuffers = SDL_GL_ExtensionSupported("GL_ARB_draw_buffers");
+	mHasBlendFuncSeparate = SDL_GL_ExtensionSupported("GL_EXT_blend_func_separate");
+	mHasTextureRectangle = SDL_GL_ExtensionSupported("GL_ARB_texture_rectangle");
+	mHasTextureMultisample = SDL_GL_ExtensionSupported("GL_ARB_texture_multisample");
+	mHasDebugOutput = SDL_GL_ExtensionSupported("GL_ARB_debug_output");
+	mHasTransformFeedback = mGLVersion >= 4.f ? TRUE : FALSE;
+	mHasPointParameters = SDL_GL_ExtensionSupported("GL_ARB_point_parameters");
+	mHasTextureSwizzle = SDL_GL_ExtensionSupported("GL_ARB_texture_swizzle");
+    mHasGPUShader4 = SDL_GL_ExtensionSupported("GL_EXT_gpu_shader4");
+    mHasClipControl = SDL_GL_ExtensionSupported("GL_ARB_clip_control");
 #else // LL_MESA_HEADLESS //important, gGLHExts.mSysExts is uninitialized until after glh_init_extensions is called
 	mHasMultitexture = glh_init_extensions("GL_ARB_multitexture");
 	mHasATIMemInfo = ExtensionExists("GL_ATI_meminfo", gGLHExts.mSysExts); //Basic AMD method, also see mHasAMDAssociations
@@ -1350,8 +1394,9 @@ void LLGLManager::initExtensions()
 		glDebugMessageCallbackARB = (PFNGLDEBUGMESSAGECALLBACKARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDebugMessageCallbackARB");
 		glGetDebugMessageLogARB = (PFNGLGETDEBUGMESSAGELOGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetDebugMessageLogARB");
 	}
-#if (!LL_LINUX) || LL_LINUX_NV_GL_HEADERS
-	// This is expected to be a static symbol on Linux GL implementations, except if we use the nvidia headers - bah
+
+#if !LL_SDL && ((!LL_LINUX) || LL_LINUX_NV_GL_HEADERS)
+	// These are expected to be a static symbol on Linux GL implementations, except if we use the nvidia headers - bah
 	glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawRangeElements");
 	if (!glDrawRangeElements)
 	{
@@ -1365,6 +1410,10 @@ void LLGLManager::initExtensions()
  	glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)GLH_EXT_GET_PROC_ADDRESS("glClientActiveTextureARB");
 #endif // LL_LINUX_NV_GL_HEADERS
 
+#if !LL_SDL && LL_WINDOWS
+	glTexImage3D = (PFNGLTEXIMAGE3DPROC) GLH_EXT_GET_PROC_ADDRESS("glTexImage3D");
+#endif
+
 	if (mHasOcclusionQuery)
 	{
 		LL_INFOS() << "initExtensions() OcclusionQuery-related procs..." << LL_ENDL;
@@ -1391,9 +1440,6 @@ void LLGLManager::initExtensions()
 		glPointParameterfvARB = (PFNGLPOINTPARAMETERFVARBPROC)GLH_EXT_GET_PROC_ADDRESS("glPointParameterfvARB");
 	}
 
-	// Assume 1.2
-	glTexImage3D = (PFNGLTEXIMAGE3DPROC) GLH_EXT_GET_PROC_ADDRESS("glTexImage3D");
-
     // Assume shader capabilities
     glDeleteObjectARB         = (PFNGLDELETEOBJECTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteObjectARB");
     glGetHandleARB            = (PFNGLGETHANDLEARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetHandleARB");
diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h
index cbe39140cda398a896822336b10f1077246f878e..1e48e2c75ac919d80c25d87694d89f20633c4572 100644
--- a/indra/llrender/llglheaders.h
+++ b/indra/llrender/llglheaders.h
@@ -41,6 +41,238 @@
 # include "GL/glh_extensions.h"
 # undef __APPLE__
 
+#elif LL_SDL
+#include "SDL2/SDL_opengl.h"
+
+// GL_ARB_vertex_array_object
+extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
+extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
+extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
+extern PFNGLISVERTEXARRAYPROC glIsVertexArray;
+
+// GL_ARB_vertex_buffer_object
+extern PFNGLBINDBUFFERARBPROC		glBindBufferARB;
+extern PFNGLDELETEBUFFERSARBPROC	glDeleteBuffersARB;
+extern PFNGLGENBUFFERSARBPROC		glGenBuffersARB;
+extern PFNGLISBUFFERARBPROC			glIsBufferARB;
+extern PFNGLBUFFERDATAARBPROC		glBufferDataARB;
+extern PFNGLBUFFERSUBDATAARBPROC	glBufferSubDataARB;
+extern PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubDataARB;
+extern PFNGLMAPBUFFERARBPROC		glMapBufferARB;
+extern PFNGLUNMAPBUFFERARBPROC		glUnmapBufferARB;
+extern PFNGLGETBUFFERPARAMETERIVARBPROC	glGetBufferParameterivARB;
+extern PFNGLGETBUFFERPOINTERVARBPROC	glGetBufferPointervARB;
+
+// GL_ARB_sync
+extern PFNGLFENCESYNCPROC				glFenceSync;
+extern PFNGLISSYNCPROC					glIsSync;
+extern PFNGLDELETESYNCPROC				glDeleteSync;
+extern PFNGLCLIENTWAITSYNCPROC			glClientWaitSync;
+extern PFNGLWAITSYNCPROC				glWaitSync;
+extern PFNGLGETINTEGER64VPROC			glGetInteger64v;
+extern PFNGLGETSYNCIVPROC				glGetSynciv;
+
+// GL_APPLE_flush_buffer_range
+extern PFNGLBUFFERPARAMETERIAPPLEPROC	glBufferParameteriAPPLE;
+extern PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE;
+
+// GL_ARB_map_buffer_range
+extern PFNGLMAPBUFFERRANGEPROC			glMapBufferRange;
+extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC	glFlushMappedBufferRange;
+
+// GL_ATI_vertex_array_object
+extern PFNGLNEWOBJECTBUFFERATIPROC			glNewObjectBufferATI;
+extern PFNGLISOBJECTBUFFERATIPROC			glIsObjectBufferATI;
+extern PFNGLUPDATEOBJECTBUFFERATIPROC		glUpdateObjectBufferATI;
+extern PFNGLGETOBJECTBUFFERFVATIPROC		glGetObjectBufferfvATI;
+extern PFNGLGETOBJECTBUFFERIVATIPROC		glGetObjectBufferivATI;
+extern PFNGLFREEOBJECTBUFFERATIPROC		    glFreeObjectBufferATI;
+extern PFNGLARRAYOBJECTATIPROC				glArrayObjectATI;
+extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC	glVertexAttribArrayObjectATI;
+extern PFNGLGETARRAYOBJECTFVATIPROC			glGetArrayObjectfvATI;
+extern PFNGLGETARRAYOBJECTIVATIPROC			glGetArrayObjectivATI;
+extern PFNGLVARIANTARRAYOBJECTATIPROC		glVariantObjectArrayATI;
+extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC	glGetVariantArrayObjectfvATI;
+extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC	glGetVariantArrayObjectivATI;
+
+// GL_ARB_occlusion_query
+extern PFNGLGENQUERIESARBPROC glGenQueriesARB;
+extern PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB;
+extern PFNGLISQUERYARBPROC glIsQueryARB;
+extern PFNGLBEGINQUERYARBPROC glBeginQueryARB;
+extern PFNGLENDQUERYARBPROC glEndQueryARB;
+extern PFNGLGETQUERYIVARBPROC glGetQueryivARB;
+extern PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB;
+extern PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB;
+
+// GL_ARB_timer_query
+extern PFNGLQUERYCOUNTERPROC glQueryCounter;
+extern PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v;
+extern PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v;
+
+// GL_ARB_point_parameters
+extern PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB;
+extern PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB;
+
+// GL_ARB_shader_objects
+extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
+extern PFNGLGETHANDLEARBPROC glGetHandleARB;
+extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB;
+extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
+extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
+extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
+extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
+extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
+extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
+extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
+extern PFNGLVALIDATEPROGRAMARBPROC glValidateProgramARB;
+extern PFNGLUNIFORM1FARBPROC glUniform1fARB;
+extern PFNGLUNIFORM2FARBPROC glUniform2fARB;
+extern PFNGLUNIFORM3FARBPROC glUniform3fARB;
+extern PFNGLUNIFORM4FARBPROC glUniform4fARB;
+extern PFNGLUNIFORM1IARBPROC glUniform1iARB;
+extern PFNGLUNIFORM2IARBPROC glUniform2iARB;
+extern PFNGLUNIFORM3IARBPROC glUniform3iARB;
+extern PFNGLUNIFORM4IARBPROC glUniform4iARB;
+extern PFNGLUNIFORM1FVARBPROC glUniform1fvARB;
+extern PFNGLUNIFORM2FVARBPROC glUniform2fvARB;
+extern PFNGLUNIFORM3FVARBPROC glUniform3fvARB;
+extern PFNGLUNIFORM4FVARBPROC glUniform4fvARB;
+extern PFNGLUNIFORM1IVARBPROC glUniform1ivARB;
+extern PFNGLUNIFORM2IVARBPROC glUniform2ivARB;
+extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB;
+extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB;
+extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB;
+extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB;
+extern PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv;
+extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB;
+extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB;
+extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
+extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
+extern PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedObjectsARB;
+extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
+extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB;
+extern PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB;
+extern PFNGLGETUNIFORMIVARBPROC glGetUniformivARB;
+extern PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB;
+
+// GL_ARB_vertex_shader
+extern PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB;
+extern PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB;
+extern PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB;
+extern PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fvARB;
+extern PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1sARB;
+extern PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1svARB;
+extern PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2dARB;
+extern PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dvARB;
+extern PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2fARB;
+extern PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fvARB;
+extern PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2sARB;
+extern PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2svARB;
+extern PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3dARB;
+extern PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dvARB;
+extern PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB;
+extern PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB;
+extern PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB;
+extern PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB;
+extern PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB;
+extern PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB;
+extern PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB;
+extern PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB;
+extern PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB;
+extern PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB;
+extern PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB;
+extern PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB;
+extern PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB;
+extern PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB;
+extern PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4fARB;
+extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB;
+extern PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4ivARB;
+extern PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4sARB;
+extern PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4svARB;
+extern PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubvARB;
+extern PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uivARB;
+extern PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usvARB;
+extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB;
+extern PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer;
+extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB;
+extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB;
+extern PFNGLPROGRAMSTRINGARBPROC glProgramStringARB;
+extern PFNGLBINDPROGRAMARBPROC glBindProgramARB;
+extern PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB;
+extern PFNGLGENPROGRAMSARBPROC glGenProgramsARB;
+extern PFNGLPROGRAMENVPARAMETER4DARBPROC glProgramEnvParameter4dARB;
+extern PFNGLPROGRAMENVPARAMETER4DVARBPROC glProgramEnvParameter4dvARB;
+extern PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB;
+extern PFNGLPROGRAMENVPARAMETER4FVARBPROC glProgramEnvParameter4fvARB;
+extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB;
+extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC glProgramLocalParameter4dvARB;
+extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC glProgramLocalParameter4fARB;
+extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB;
+extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC glGetProgramEnvParameterdvARB;
+extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC glGetProgramEnvParameterfvARB;
+extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB;
+extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC glGetProgramLocalParameterfvARB;
+extern PFNGLGETPROGRAMIVARBPROC glGetProgramivARB;
+extern PFNGLGETPROGRAMSTRINGARBPROC glGetProgramStringARB;
+extern PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdvARB;
+extern PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB;
+extern PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB;
+extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB;
+extern PFNGLISPROGRAMARBPROC glIsProgramARB;
+extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB;
+extern PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB;
+extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB;
+
+extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB;
+extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC glGetCompressedTexImageARB;
+
+//GL_EXT_blend_func_separate
+extern PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT;
+
+//GL_ARB_framebuffer_object
+extern PFNGLISRENDERBUFFERPROC glIsRenderbuffer;
+extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer;
+extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers;
+extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers;
+extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage;
+extern PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv;
+extern PFNGLISFRAMEBUFFERPROC glIsFramebuffer;
+extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer;
+extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers;
+extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers;
+extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus;
+extern PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D;
+extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D;
+extern PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D;
+extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer;
+extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv;
+extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap;
+extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer;
+extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample;
+extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer;
+
+//GL_ARB_draw_buffers
+extern PFNGLDRAWBUFFERSARBPROC glDrawBuffersARB;
+
+//GL_ARB_texture_multisample
+extern PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample;
+extern PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample;
+extern PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv;
+extern PFNGLSAMPLEMASKIPROC glSampleMaski;
+
+//transform feedback (4.0 core)
+extern PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback;
+extern PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback;
+extern PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings;
+extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
+extern PFNGLBINDBUFFERBASEPROC glBindBufferBase;
+
+//GL_ARB_debug_output
+extern PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB;
+extern PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsertARB;
+extern PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB;
+extern PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB;
 #elif LL_LINUX
 //----------------------------------------------------------------------------
 // LL_LINUX
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index bb478af52b288eaf0724349a2e88c9294fd8e254..3bc807de75c56e7660a547035077208e5ecfbf2a 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -74,12 +74,12 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
 #if LL_MESA_HEADLESS // !!! *FIX: (?)
 	LL_WARNS() << "OSMessageBox: " << text << LL_ENDL;
 	return OSBTN_OK;
+#elif LL_SDL
+	result = OSMessageBoxSDL(text, caption, type);
 #elif LL_WINDOWS
 	result = OSMessageBoxWin32(text, caption, type);
 #elif LL_DARWIN
 	result = OSMessageBoxMacOSX(text, caption, type);
-#elif LL_SDL
-	result = OSMessageBoxSDL(text, caption, type);
 #else
 #error("OSMessageBox not implemented for this platform!")
 #endif
@@ -254,12 +254,12 @@ BOOL LLWindow::copyTextToPrimary(const LLWString &src)
 // static
 std::vector<std::string> LLWindow::getDynamicFallbackFontList()
 {
-#if LL_WINDOWS
+#if LL_SDL
+	return LLWindowSDL::getDynamicFallbackFontList();
+#elif LL_WINDOWS
 	return LLWindowWin32::getDynamicFallbackFontList();
 #elif LL_DARWIN
 	return LLWindowMacOSX::getDynamicFallbackFontList();
-#elif LL_SDL
-	return LLWindowSDL::getDynamicFallbackFontList();
 #else
 	return std::vector<std::string>();
 #endif
@@ -268,7 +268,9 @@ std::vector<std::string> LLWindow::getDynamicFallbackFontList()
 // static
 std::vector<std::string> LLWindow::getDisplaysResolutionList()
 {
-#if LL_WINDOWS
+#if LL_SDL
+	return std::vector<std::string>();
+#elif LL_WINDOWS
 	return LLWindowWin32::getDisplaysResolutionList();
 #elif LL_DARWIN
 	return LLWindowMacOSX::getDisplaysResolutionList();
@@ -337,8 +339,10 @@ bool LLSplashScreen::isVisible()
 // static
 LLSplashScreen *LLSplashScreen::create()
 {
-#if LL_MESA_HEADLESS || LL_SDL  // !!! *FIX: (?)
+#if LL_MESA_HEADLESS
 	return 0;
+#elif LL_SDL
+	return new LLSplashScreenSDL;
 #elif LL_WINDOWS
 	return new LLSplashScreenWin32;
 #elif LL_DARWIN
@@ -354,7 +358,9 @@ void LLSplashScreen::show()
 {
 	if (!gSplashScreenp)
 	{
-#if LL_WINDOWS && !LL_MESA_HEADLESS
+#if LL_SDL && !LL_MESA_HEADLESS
+		gSplashScreenp = new LLSplashScreenSDL;
+#elif LL_WINDOWS && !LL_MESA_HEADLESS
 		gSplashScreenp = new LLSplashScreenWin32;
 #elif LL_DARWIN
 		gSplashScreenp = new LLSplashScreenMacOSX;
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index c5dd9115d0abe12f136ee84b5516d5697e920112..edac7d21c7ef28715829f49140816ab2c97ea731 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -258,6 +258,12 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
 		return;
 	}
 	
+	if (SDL_GL_LoadLibrary(nullptr) != 0)
+	{
+		LL_WARNS() << "Failed to initialize OpenGL Library due to error: " << SDL_GetError() << LL_ENDL;
+		return;
+	}
+
 	// Initialize the keyboard
 	gKeyboard = new LLKeyboardSDL();
 	gKeyboard->setCallbacks(callbacks);
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 88ef037a534821eae823969d498c4d2db7b815dd..756d1741082b94fa73da63ca63a9219548abaaad 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -69,8 +69,6 @@ if( LLPHYSICSEXTENSIONS_SRC_DIR )
   endif (NOT HAVOK_TPV)
 endif( LLPHYSICSEXTENSIONS_SRC_DIR )
 
-message(STATUS "CMAKE_CURRENT_BINARY_DIR = ${CMAKE_CURRENT_BINARY_DIR}")
-
 include_directories(
     ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_CURRENT_BINARY_DIR}