Project

General

Profile

« Previous | Next » 

Revision 3ef3364d

Added by Leszek Koltunski over 7 years ago

Hide the 'depth' of a DistortedTexture inside the library, so users do not get exposed to this weirdness.

View differences:

src/main/java/org/distorted/library/GridObject.java
34 34

  
35 35
   protected int dataLength;
36 36
   protected FloatBuffer mGridPositions,mGridNormals,mGridTexture;
37
 
37

  
38
   final float zFactor; // strange workaround the fact that we need to somehow store the 'depth'
39
                        // of the Grid. Used in DistortedEffectQueues. See DistortedTexture.getDepth().
40

  
38 41
///////////////////////////////////////////////////////////////////////////////////////////////////
39
   
42

  
43
   GridObject(float factor)
44
     {
45
     zFactor = factor;
46
     }
47

  
48
///////////////////////////////////////////////////////////////////////////////////////////////////
49

  
40 50
   void draw()
41 51
     { 
42 52
     GLES20.glVertexAttribPointer(Distorted.mPositionH    , POSITION_DATA_SIZE, GLES20.GL_FLOAT, false, 0, mGridPositions);          

Also available in: Unified diff