Project

General

Profile

« Previous | Next » 

Revision c834348d

Added by Leszek Koltunski about 7 years ago

Make it possible to render each DistortedNode with adjustable OpeGL state (writeing to Color, Depth,Stencil buffers, DEPTH, STENCIL, BLENDING on.off, etc)

View differences:

src/main/java/org/distorted/library/DistortedOutputSurface.java
143 143
      DistortedSurface.debugLists();
144 144
      }
145 145
*/
146
    GLES30.glEnable(GLES30.GL_BLEND);
147
    GLES30.glBlendFunc(GLES30.GL_SRC_ALPHA, GLES30.GL_ONE_MINUS_SRC_ALPHA);
146
    // mark OpenGL state as unknown
147
    DistortedRenderState.reset();
148 148

  
149 149
    int numRenders = 0;
150 150

  
......
163 163
  public void setAsOutput()
164 164
    {
165 165
    GLES30.glBindFramebuffer(GLES30.GL_FRAMEBUFFER, mFBOH[0]);
166

  
167
    if( mDepthCreated==CREATED )
168
      {
169
      GLES30.glEnable(GLES30.GL_DEPTH_TEST);
170
      GLES30.glDepthMask(true);
171
      }
172
    else
173
      {
174
      GLES30.glDisable(GLES30.GL_DEPTH_TEST);
175
      GLES30.glDepthMask(false);
176
      }
177 166
    }
178 167

  
179 168
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff