summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llgl.h')
-rw-r--r--indra/llrender/llgl.h78
1 files changed, 25 insertions, 53 deletions
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 33cb0706c4..4b0fbc0466 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -76,50 +76,27 @@ public:
BOOL mInited;
BOOL mIsDisabled;
- // Extensions used by everyone
- BOOL mHasMultitexture;
- BOOL mHasATIMemInfo;
- BOOL mHasAMDAssociations;
- BOOL mHasNVXMemInfo;
- S32 mNumTextureUnits;
- BOOL mHasMipMapGeneration;
- BOOL mHasCompressedTextures;
- BOOL mHasFramebufferObject;
+ // OpenGL limits
S32 mMaxSamples;
- BOOL mHasBlendFuncSeparate;
-
- // ARB Extensions
- BOOL mHasVertexBufferObject;
- BOOL mHasVertexArrayObject;
- BOOL mHasSync;
- BOOL mHasMapBufferRange;
- BOOL mHasFlushBufferRange;
- BOOL mHasPBuffer;
- S32 mNumTextureImageUnits;
- BOOL mHasOcclusionQuery;
- BOOL mHasTimerQuery;
- BOOL mHasOcclusionQuery2;
- BOOL mHasPointParameters;
- BOOL mHasDrawBuffers;
- BOOL mHasDepthClamp;
- BOOL mHasTextureRectangle;
- BOOL mHasTextureMultisample;
- BOOL mHasTransformFeedback;
+ S32 mNumTextureImageUnits;
S32 mMaxSampleMaskWords;
S32 mMaxColorTextureSamples;
S32 mMaxDepthTextureSamples;
S32 mMaxIntegerSamples;
-
- // Other extensions.
- BOOL mHasAnisotropic;
- BOOL mHasARBEnvCombine;
- BOOL mHasCubeMap;
- BOOL mHasDebugOutput;
- BOOL mHassRGBTexture;
- BOOL mHassRGBFramebuffer;
- BOOL mHasTexturesRGBDecode;
-
+ S32 mGLMaxVertexRange;
+ S32 mGLMaxIndexRange;
+ S32 mGLMaxTextureSize;
+ F32 mMaxAnisotropy = 0.f;
+
+ // GL 4.x capabilities
+ bool mHasCubeMapArray = false;
+ bool mHasDebugOutput = false;
+ bool mHasTransformFeedback = false;
+ bool mHasAnisotropic = false;
+
// Vendor-specific extensions
+ bool mHasAMDAssociations = false;
+
BOOL mIsAMD;
BOOL mIsNVIDIA;
BOOL mIsIntel;
@@ -132,9 +109,6 @@ public:
// Whether this version of GL is good enough for SL to use
BOOL mHasRequirements;
- // Misc extensions
- BOOL mHasSeparateSpecularColor;
-
S32 mDriverVersionMajor;
S32 mDriverVersionMinor;
S32 mDriverVersionRelease;
@@ -145,9 +119,6 @@ public:
std::string mGLVersionString;
S32 mVRAM; // VRAM in MB
- S32 mGLMaxVertexRange;
- S32 mGLMaxIndexRange;
- S32 mGLMaxTextureSize;
void getPixelFormat(); // Get the best pixel format
@@ -221,13 +192,13 @@ void clear_glerror();
//disable lighting for rendering hud objects
//INCORRECT USAGE
- LLGLEnable lighting(GL_LIGHTING);
+ LLGLEnable blend(GL_BLEND);
renderHUD();
- LLGLDisable lighting(GL_LIGHTING);
+ LLGLDisable blend(GL_BLEND);
//CORRECT USAGE
{
- LLGLEnable lighting(GL_LIGHTING);
+ LLGLEnable blend(GL_BLEND);
renderHUD();
}
@@ -235,7 +206,7 @@ void clear_glerror();
is useful:
{
- LLGLEnable lighting(light_hud ? GL_LIGHTING : 0);
+ LLGLEnable blend(blend_hud ? GL_GL_BLEND: 0);
renderHUD();
}
@@ -260,9 +231,12 @@ public:
static void resetTextureStates();
static void dumpStates();
- static void checkStates(const std::string& msg = "");
- static void checkTextureChannels(const std::string& msg = "");
-
+
+ // make sure GL blend function, GL states, and GL color mask match
+ // what we expect
+ // writeAlpha - whether or not writing to alpha channel is expected
+ static void checkStates(GLboolean writeAlpha = GL_TRUE);
+
protected:
static boost::unordered_map<LLGLenum, LLGLboolean> sStateMap;
@@ -413,9 +387,7 @@ public:
class LLGLSyncFence : public LLGLFence
{
public:
-#ifdef GL_ARB_sync
GLsync mSync;
-#endif
LLGLSyncFence();
virtual ~LLGLSyncFence();