Project

General

Profile

« Previous | Next » 

Revision 1aedf874

Added by Leszek Koltunski about 7 years ago

Revert "Beginnings of support for DistortedEffects.drawPrivFeedback()"

This reverts commit a22c66287b616833b0ad72d81d40cc321e4bc920.

View differences:

src/main/java/org/distorted/library/EffectQueueMatrix.java
46 46
  private static float[] mTmpMatrix = new float[16];
47 47
  private static float[] mViewMatrix= new float[16];
48 48

  
49
  private static int[] mObjDH       = new int[DistortedEffects.NUM_PROGRAMS];
50
  private static int[] mMVPMatrixH  = new int[DistortedEffects.NUM_PROGRAMS];
51
  private static int[] mMVMatrixH   = new int[DistortedEffects.NUM_PROGRAMS];
49
  private static int mObjDH;      // This is a handle to half a Object dimensions
50
  private static int mMVPMatrixH; // pass in the transformation matrix
51
  private static int mMVMatrixH;  // pass in the modelview matrix.
52 52
  
53 53
///////////////////////////////////////////////////////////////////////////////////////////////////
54 54
   
......
191 191

  
192 192
///////////////////////////////////////////////////////////////////////////////////////////////////
193 193

  
194
  static void getUniforms(int index,int mProgramH)
194
  static void getUniforms(int mProgramH)
195 195
    {
196
    mObjDH[index]     = GLES30.glGetUniformLocation(mProgramH, "u_objD");
197
    mMVPMatrixH[index]= GLES30.glGetUniformLocation(mProgramH, "u_MVPMatrix");
198
    mMVMatrixH[index] = GLES30.glGetUniformLocation(mProgramH, "u_MVMatrix");
196
    mObjDH     = GLES30.glGetUniformLocation(mProgramH, "u_objD");
197
    mMVPMatrixH= GLES30.glGetUniformLocation(mProgramH, "u_MVPMatrix");
198
    mMVMatrixH = GLES30.glGetUniformLocation(mProgramH, "u_MVMatrix"); 
199 199
    }
200 200

  
201 201
///////////////////////////////////////////////////////////////////////////////////////////////////
......
259 259

  
260 260
///////////////////////////////////////////////////////////////////////////////////////////////////
261 261

  
262
  synchronized void send(int index,DistortedOutputSurface projection, float halfX, float halfY, float halfZ)
262
  synchronized void send(DistortedOutputSurface projection, float halfX, float halfY, float halfZ)
263 263
    {
264 264
    constructMatrices(projection,halfX,halfY,halfZ);
265 265

  
266
    GLES30.glUniform3f( mObjDH[index] , halfX, halfY, halfZ);
267
    GLES30.glUniformMatrix4fv(mMVMatrixH[index] , 1, false, mViewMatrix, 0);
268
    GLES30.glUniformMatrix4fv(mMVPMatrixH[index], 1, false, mMVPMatrix , 0);
269
    }
270

  
271
///////////////////////////////////////////////////////////////////////////////////////////////////
272

  
273
  synchronized void sendFeedback(int index,DistortedOutputSurface projection, float halfX, float halfY, float halfZ)
274
    {
275
    constructMatrices(projection,halfX,halfY,halfZ);
276

  
277
    GLES30.glUniform3f( mObjDH[index] , 0.5f, 0.5f, 0.5f);
278
    GLES30.glUniformMatrix4fv(mMVMatrixH[index] , 1, false, mViewMatrix, 0);
279
    GLES30.glUniformMatrix4fv(mMVPMatrixH[index], 1, false, mMVPMatrix , 0);
266
    GLES30.glUniform3f( mObjDH , halfX, halfY, halfZ);
267
    GLES30.glUniformMatrix4fv(mMVMatrixH , 1, false, mViewMatrix, 0);
268
    GLES30.glUniformMatrix4fv(mMVPMatrixH, 1, false, mMVPMatrix , 0);
280 269
    }
281 270

  
282 271
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff