Project

General

Profile

« Previous | Next » 

Revision 580f7d10

Added by Leszek Koltunski about 7 years ago

Bugfix: we need to have DepthMask and ColorMask both fully on when clearing the FBO in Nodes!

View differences:

src/main/java/org/distorted/library/DistortedRenderState.java
105 105
    sStencilOpDppass = -1;
106 106
    }
107 107

  
108
///////////////////////////////////////////////////////////////////////////////////////////////////
109

  
110
  static void colorDepthOn()
111
    {
112
    if( sColorMaskR!=1 || sColorMaskG!=1 || sColorMaskB!=1 || sColorMaskA!=1 )
113
      {
114
      sColorMaskR = 1;
115
      sColorMaskG = 1;
116
      sColorMaskB = 1;
117
      sColorMaskA = 1;
118
      GLES30.glColorMask(true,true,true,true);
119
      }
120
    if( sDepthMask!=1 )
121
      {
122
      sDepthMask = 1;
123
      GLES30.glDepthMask(true);
124
      }
125
    }
126

  
108 127
///////////////////////////////////////////////////////////////////////////////////////////////////
109 128

  
110 129
  void apply()
......
145 164
      {
146 165
      sDepthMask = mDepthMask;
147 166
      GLES30.glDepthMask(sDepthMask==1);
167

  
168
      android.util.Log.e("STATE","switching depth mask to "+(sDepthMask==1));
148 169
      }
149 170

  
150 171
    // 4. Enable Blending?

Also available in: Unified diff