summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-20 03:34:09 -0500
committerDave Parks <davep@lindenlab.com>2011-09-20 03:34:09 -0500
commit66acb932ba7bbd7fecbe78a34e753b5aab2d2104 (patch)
tree87ae87b36d20082008feeb7c46c38d2d6d498332 /indra/llrender
parent9ea41c8094695365bc7ea10165ffd54cda204e88 (diff)
SH-2244 Add "RenderGLCoreProfile" debug setting that allows the viewer to start with a non-compatibility-profile OpenGL context.
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llgl.cpp13
-rw-r--r--indra/llrender/llglheaders.h2
-rw-r--r--indra/llrender/llrender.cpp1
-rw-r--r--indra/llrender/llrender.h1
4 files changed, 17 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 771693f2f0..718de346f6 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -249,6 +249,10 @@ PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB = NULL;
PFNGLGETUNIFORMIVARBPROC glGetUniformivARB = NULL;
PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB = NULL;
+#if LL_WINDOWS
+PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL;
+#endif
+
// vertex shader prototypes
#if LL_LINUX || LL_SOLARIS
PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB = NULL;
@@ -409,6 +413,15 @@ void LLGLManager::initWGL()
LL_WARNS("RenderInit") << "No ARB pixel format extensions" << LL_ENDL;
}
+ if (ExtensionExists("WGL_ARB_create_context",gGLHExts.mSysExts))
+ {
+ GLH_EXT_NAME(wglCreateContextAttribsARB) = (PFNWGLCREATECONTEXTATTRIBSARBPROC)GLH_EXT_GET_PROC_ADDRESS("wglCreateContextAttribsARB");
+ }
+ else
+ {
+ LL_WARNS("RenderInit") << "No ARB create context extensions" << LL_ENDL;
+ }
+
if (ExtensionExists("WGL_EXT_swap_control", gGLHExts.mSysExts))
{
GLH_EXT_NAME(wglSwapIntervalEXT) = (PFNWGLSWAPINTERVALEXTPROC)GLH_EXT_GET_PROC_ADDRESS("wglSwapIntervalEXT");
diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h
index 851a75629e..f319009bc8 100644
--- a/indra/llrender/llglheaders.h
+++ b/indra/llrender/llglheaders.h
@@ -531,6 +531,8 @@ extern PFNGLSAMPLEMASKIPROC glSampleMaski;
#include "GL/glext.h"
#include "GL/glh_extensions.h"
+// WGL_ARB_create_context
+extern PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB;
// GL_ARB_vertex_buffer_object
extern PFNGLBINDBUFFERARBPROC glBindBufferARB;
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index f0d59d0eaf..efeb7709a4 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -47,6 +47,7 @@ S32 gGLViewport[4];
U32 LLRender::sUICalls = 0;
U32 LLRender::sUIVerts = 0;
U32 LLTexUnit::sWhiteTexture = 0;
+bool LLRender::sGLCoreProfile = false;
static const U32 LL_NUM_TEXTURE_LAYERS = 32;
static const U32 LL_NUM_LIGHT_UNITS = 8;
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 7d636060f5..44d9ec1f15 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -428,6 +428,7 @@ public:
public:
static U32 sUICalls;
static U32 sUIVerts;
+ static bool sGLCoreProfile;
private:
friend class LLLightState;