Project

General

Profile

« Previous | Next » 

Revision 6e60be83

Added by Leszek Koltunski about 7 years ago

Revert "Progress with Transform Feedback."

This reverts commit e78a30fd53d9463903521921e177028e5c869514.

View differences:

src/main/java/org/distorted/library/MeshObject.java
44 44
   int[] mNorVBO = new int[1];
45 45
   int[] mTexVBO = new int[1];
46 46

  
47
   int[] mPosTBO = new int[1]; // Transform Feedback
48

  
49 47
   final float zFactor; // strange workaround for the fact that we need to somehow store the 'depth'
50 48
                        // of the Mesh. Used in DistortedEffects. See DistortedTexture.getDepth().
51 49

  
......
86 84
       GLES30.glBufferData(GLES30.GL_ARRAY_BUFFER, dataLength*    TEX_DATA_SIZE*BYTES_PER_FLOAT, mMeshTexture  , GLES30.GL_STATIC_READ);
87 85
       }
88 86

  
89
     if( mPosTBO[0]<0 )
90
       {
91
       GLES30.glBindBuffer(GLES30.GL_TRANSFORM_FEEDBACK_BUFFER, mPosTBO[0]);
92
       GLES30.glBufferData(GLES30.GL_TRANSFORM_FEEDBACK_BUFFER, dataLength*POSITION_DATA_SIZE*BYTES_PER_FLOAT, null, GLES30.GL_STATIC_READ);
93
       GLES30.glBindBuffer(GLES30.GL_TRANSFORM_FEEDBACK_BUFFER, 0);
94
       }
95

  
96 87
     GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, 0);
97 88
     }
98 89

  
......
116 107
       GLES30.glDeleteBuffers(1, mTexVBO, 0);
117 108
       mTexVBO[0] = -1;
118 109
       }
119
     if( mPosTBO[0]>=0 )
120
       {
121
       GLES30.glDeleteBuffers(1, mPosTBO, 0);
122
       mPosTBO[0] = -1;
123
       }
124 110
     }
125 111

  
126 112
///////////////////////////////////////////////////////////////////////////////////////////////////
......
130 116
     mPosVBO[0] = -1;
131 117
     mNorVBO[0] = -1;
132 118
     mTexVBO[0] = -1;
133
     mPosTBO[0] = -1;
134 119
     }
135 120

  
136 121
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff