This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit da010cae71dd21d2c5a56b3ea71abbfd4914daef
Author: m4n4t4...@gmail.com 
<m4n4t4...@gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Mon Dec 1 19:10:12 2014 +0000

    All: Rend2: Fix face culling
---
 MP/code/rend2/tr_backend.c |  5 +----
 MP/code/rend2/tr_init.c    |  2 +-
 MP/code/rend2/tr_shade.c   | 15 +--------------
 SP/code/rend2/tr_backend.c |  5 +----
 SP/code/rend2/tr_init.c    |  2 +-
 SP/code/rend2/tr_shade.c   | 15 +--------------
 6 files changed, 6 insertions(+), 38 deletions(-)

diff --git a/MP/code/rend2/tr_backend.c b/MP/code/rend2/tr_backend.c
index e372f12..c2899f0 100644
--- a/MP/code/rend2/tr_backend.c
+++ b/MP/code/rend2/tr_backend.c
@@ -135,7 +135,7 @@ void GL_Cull( int cullType ) {
        {
                qboolean cullFront;
 
-               if ( glState.faceCulling == CT_TWO_SIDED || glState.faceCulling 
== -1 )
+               if ( glState.faceCulling == CT_TWO_SIDED )
                {
                        qglEnable( GL_CULL_FACE );
                }
@@ -604,9 +604,6 @@ void RB_BeginDrawingView( void ) {
                backEnd.isHyperspace = qfalse;
        }
 
-       glState.faceCulling = -1;       // force face culling to set next time
-       glState.faceCullFront = -1;     // same as above
-
        // we will only draw a sun if there was sky rendered in this view
        backEnd.skyRenderedThisView = qfalse;
 
diff --git a/MP/code/rend2/tr_init.c b/MP/code/rend2/tr_init.c
index 0fd6310..30152c5 100644
--- a/MP/code/rend2/tr_init.c
+++ b/MP/code/rend2/tr_init.c
@@ -1021,7 +1021,7 @@ void GL_SetDefaultState( void ) {
        glState.glStateBits = GLS_DEPTHTEST_DISABLE | GLS_DEPTHMASK_TRUE;
        glState.storedGlState = 0;
        glState.faceCulling = CT_TWO_SIDED;
-       glState.faceCullFront = CT_FRONT_SIDED;
+       glState.faceCullFront = qtrue;
 
        glState.currentProgram = 0;
        qglUseProgramObjectARB(0);
diff --git a/MP/code/rend2/tr_shade.c b/MP/code/rend2/tr_shade.c
index e643b63..bd64b84 100644
--- a/MP/code/rend2/tr_shade.c
+++ b/MP/code/rend2/tr_shade.c
@@ -1289,20 +1289,7 @@ static void RB_IterateStagesGeneric( shaderCommands_t 
*input )
                        GLSL_SetUniformFloat(sp, UNIFORM_FOGEYET, eyeT);
                }
 
-               {
-                       unsigned int stateBits = pStage->stateBits;
-                       
-                       if (tess.shader->sort == SS_OPAQUE && 
r_depthPrepass->integer && !backEnd.depthFill && !(backEnd.refdef.rdflags & 
RDF_NOWORLDMODEL))
-                       {
-                               if (!(stateBits & GLS_DEPTHMASK_TRUE) && 
!(stateBits & GLS_DEPTHTEST_DISABLE) && (stateBits & GLS_DEPTHFUNC_BITS) != 
GLS_DEPTHFUNC_GREATER)
-                               {
-                                       stateBits &= ~GLS_DEPTHFUNC_BITS;
-                                       stateBits |= GLS_DEPTHMASK_TRUE | 
GLS_DEPTHFUNC_EQUAL;
-                               }
-                       }
- 
-                       GL_State( stateBits );
-               }
+               GL_State( pStage->stateBits );
 
                {
                        vec4_t baseColor;
diff --git a/SP/code/rend2/tr_backend.c b/SP/code/rend2/tr_backend.c
index f804171..1d44c67 100644
--- a/SP/code/rend2/tr_backend.c
+++ b/SP/code/rend2/tr_backend.c
@@ -135,7 +135,7 @@ void GL_Cull( int cullType ) {
        {
                qboolean cullFront;
 
-               if ( glState.faceCulling == CT_TWO_SIDED || glState.faceCulling 
== -1 )
+               if ( glState.faceCulling == CT_TWO_SIDED )
                {
                        qglEnable( GL_CULL_FACE );
                }
@@ -609,9 +609,6 @@ void RB_BeginDrawingView( void ) {
                backEnd.isHyperspace = qfalse;
        }
 
-       glState.faceCulling = -1;       // force face culling to set next time
-       glState.faceCullFront = -1;     // same as above
-
        // we will only draw a sun if there was sky rendered in this view
        backEnd.skyRenderedThisView = qfalse;
 
diff --git a/SP/code/rend2/tr_init.c b/SP/code/rend2/tr_init.c
index 86b1995..5934e3a 100644
--- a/SP/code/rend2/tr_init.c
+++ b/SP/code/rend2/tr_init.c
@@ -1026,7 +1026,7 @@ void GL_SetDefaultState( void ) {
        glState.glStateBits = GLS_DEPTHTEST_DISABLE | GLS_DEPTHMASK_TRUE;
        glState.storedGlState = 0;
        glState.faceCulling = CT_TWO_SIDED;
-       glState.faceCullFront = CT_FRONT_SIDED;
+       glState.faceCullFront = qtrue;
 
        glState.currentProgram = 0;
        qglUseProgramObjectARB(0);
diff --git a/SP/code/rend2/tr_shade.c b/SP/code/rend2/tr_shade.c
index 8aa0071..cd4cafb 100644
--- a/SP/code/rend2/tr_shade.c
+++ b/SP/code/rend2/tr_shade.c
@@ -1283,20 +1283,7 @@ static void RB_IterateStagesGeneric( shaderCommands_t 
*input )
                        GLSL_SetUniformFloat(sp, UNIFORM_FOGEYET, eyeT);
                }
 
-               {
-                       unsigned int stateBits = pStage->stateBits;
-                       
-                       if (tess.shader->sort == SS_OPAQUE && 
r_depthPrepass->integer && !backEnd.depthFill && !(backEnd.refdef.rdflags & 
RDF_NOWORLDMODEL))
-                       {
-                               if (!(stateBits & GLS_DEPTHMASK_TRUE) && 
!(stateBits & GLS_DEPTHTEST_DISABLE) && (stateBits & GLS_DEPTHFUNC_BITS) != 
GLS_DEPTHFUNC_GREATER)
-                               {
-                                       stateBits &= ~GLS_DEPTHFUNC_BITS;
-                                       stateBits |= GLS_DEPTHMASK_TRUE | 
GLS_DEPTHFUNC_EQUAL;
-                               }
-                       }
- 
-                       GL_State( stateBits );
-               }
+               GL_State( pStage->stateBits );
 
                {
                        vec4_t baseColor;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to