Project

General

Profile

« Previous | Next » 

Revision 21304c55

Added by Leszek Koltunski about 7 years ago

Progress with TransferFeedback app - introduce two modes: USEPOINTS 'true' or 'false'.

On Nexus5X, it works with 'true' and 'false'. On Nexus 4, it works with 'true', but returns GL_INVALID_OPERATION with 'false'.

View differences:

src/main/java/org/distorted/library/DistortedEffects.java
287 287

  
288 288
  void drawPriv(float halfW, float halfH, MeshObject mesh, DistortedOutputSurface surface, long currTime)
289 289
    {
290
    int error;
291

  
290 292
    mM.compute(currTime);
291 293
    mV.compute(currTime);
292 294
    mF.compute(currTime);
......
313 315
    GLES30.glBindBufferBase(GLES30.GL_TRANSFORM_FEEDBACK_BUFFER, 0, mesh.mPosTBO[0]);
314 316

  
315 317
    GLES30.glBeginTransformFeedback(GLES30.GL_TRIANGLES);
316
    GLES30.glDrawArrays(GLES30.GL_TRIANGLE_STRIP, 0, mesh.dataLength);
317 318

  
318
    int error = GLES30.glGetError();
319
    error = GLES30.glGetError();
320
    if (error != GLES30.GL_NO_ERROR)
321
      {
322
      throw new RuntimeException("1 glError 0x" + Integer.toHexString(error));
323
      }
324

  
325
    GLES30.glDrawArrays(GLES30.GL_TRIANGLE_STRIP, 0, mesh.dataLength);
319 326

  
327
    error = GLES30.glGetError();
320 328
    if (error != GLES30.GL_NO_ERROR)
321 329
      {
322
      throw new RuntimeException("glError 0x" + Integer.toHexString(error));
330
      throw new RuntimeException("2 glError 0x" + Integer.toHexString(error));
323 331
      }
324 332

  
325 333
    GLES30.glEndTransformFeedback();

Also available in: Unified diff