From 530981a2149a74e1dc003cea1bbc9dc392fcae60 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 15 Sep 2011 00:54:25 -0500 Subject: SH-2243 work in progress -- no more deprecated built-in matrix state when using shaders. --- indra/llrender/llglslshader.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llrender/llglslshader.h') diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index 558ea66b50..c1765e2701 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -117,7 +117,6 @@ public: GLint getAttribLocation(U32 attrib); GLint mapUniformTextureChannel(GLint location, GLenum type); - //enable/disable texture channel for specified uniform //if given texture uniform is active in the shader, //the corresponding channel will be active upon return @@ -132,6 +131,8 @@ public: // Unbinds any previously bound shader by explicitly binding no shader. static void bindNoShader(void); + U32 mMatHash[LLRender::NUM_MATRIX_MODES]; + GLhandleARB mProgramObject; std::vector mAttribute; //lookup table of attribute enum to attribute channel std::vector mUniform; //lookup table of uniform enum to uniform location -- cgit v1.2.3 From 4fea7dcb3ef35cae9e31ba467403d31ce9083905 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 15 Sep 2011 17:10:33 -0500 Subject: SH-2243 work in progress -- use a hash check to avoid redundantly setting light state --- indra/llrender/llglslshader.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llrender/llglslshader.h') diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index c1765e2701..04dc594d87 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -132,6 +132,7 @@ public: static void bindNoShader(void); U32 mMatHash[LLRender::NUM_MATRIX_MODES]; + U32 mLightHash; GLhandleARB mProgramObject; std::vector mAttribute; //lookup table of attribute enum to attribute channel -- cgit v1.2.3 From 348a70181211b8fe37c569f8b3fb8324cc8c59ea Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 28 Sep 2011 00:41:10 -0500 Subject: SH-2507 Shave some unused/redundant varying state and make the max texture index debug setting rebuild shaders to use no flow control when set to 1 or lower --- indra/llrender/llglslshader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llglslshader.h') diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index 04dc594d87..beef57796d 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -69,7 +69,7 @@ public: static GLhandleARB sCurBoundShader; static LLGLSLShader* sCurBoundShaderPtr; - + static S32 sIndexedTextureChannels; static bool sNoFixedFunction; void unload(); -- cgit v1.2.3 From 3211c6e3089b03d73f2e260be4037304660f834d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 11 Oct 2011 00:26:03 -0500 Subject: SH-2240 WIP on removing lots of string comparisons that were added to deal with exploding amounts of non-built-in GL state --- indra/llrender/llglslshader.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llrender/llglslshader.h') diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index beef57796d..eb19599eca 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -114,6 +114,8 @@ public: void vertexAttrib4fv(U32 index, GLfloat* v); GLint getUniformLocation(const std::string& uniform); + GLint getUniformLocation(U32 index); + GLint getAttribLocation(U32 attrib); GLint mapUniformTextureChannel(GLint location, GLenum type); -- cgit v1.2.3 From 2179e1c1f2f3614678d528fe96640728ce663f2e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 2 Nov 2011 13:13:38 -0500 Subject: SH-2541 Fix for speckles on avatar on some cards -- don't use "maximum_alpha" for alpha tests in shaders as it was always being set to 1.0 anyway. --- indra/llrender/llglslshader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llglslshader.h') diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index eb19599eca..2a6c050eac 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -108,7 +108,7 @@ public: void uniformMatrix3fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v); void uniformMatrix4fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v); - void setAlphaRange(F32 minimum, F32 maximum); + void setMinimumAlpha(F32 minimum); void vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); void vertexAttrib4fv(U32 index, GLfloat* v); -- cgit v1.2.3