Project

General

Profile

« Previous | Next » 

Revision 86e99907

Added by Leszek Koltunski almost 7 years ago

Correct the FPS work (now works even after a Pause() ! )

View differences:

src/main/java/org/distorted/library/DistortedFramebuffer.java
31 31
public class DistortedFramebuffer extends DistortedOutputSurface implements DistortedInputSurface
32 32
  {
33 33

  
34
///////////////////////////////////////////////////////////////////////////////////////////////////
35

  
36
  void prepareDebug(long time) {}
37
  void renderDebug(long time)  {}
38

  
34 39
///////////////////////////////////////////////////////////////////////////////////////////////////
35 40
// Must be called from a thread holding OpenGL Context
36 41

  
......
170 175
    super(width,height,NOT_CREATED_YET,numcolors,depthStencil,NOT_CREATED_YET, type);
171 176
    }
172 177

  
173
///////////////////////////////////////////////////////////////////////////////////////////////////
174
// For setting the Depth texture as input to fragment shaders that merge many planes. (currently: blur2)
175

  
176
  boolean setAsDepth()
177
    {
178
    if( mDepthStencilH[0]>0 )
179
      {
180
      GLES30.glActiveTexture(GLES30.GL_TEXTURE1);
181
      GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, mDepthStencilH[0]);
182
      return true;
183
      }
184

  
185
    return false;
186
    }
187

  
188 178
///////////////////////////////////////////////////////////////////////////////////////////////////
189 179
// PUBLIC API
190 180
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff