Project

General

Profile

« Previous | Next » 

Revision 135be991

Added by Leszek Koltunski about 7 years ago

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

This reverts commit 21304c55380460c5882b789ea13eb00ffd9a686c.

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

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

  
317 315
    GLES30.glBeginTransformFeedback(GLES30.GL_TRIANGLES);
318

  
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 316
    GLES30.glDrawArrays(GLES30.GL_TRIANGLE_STRIP, 0, mesh.dataLength);
326 317

  
327
    error = GLES30.glGetError();
318
    int error = GLES30.glGetError();
319

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

  
333 325
    GLES30.glEndTransformFeedback();
src/main/res/raw/feedback_fragment_shader.glsl
19 19

  
20 20
precision mediump float;
21 21

  
22
out vec4 fragColor;
22
#if __VERSION__ != 100
23
out vec4 fragColor;           // The output color
24
#define FRAG_COLOR fragColor
25
#else
26
#define FRAG_COLOR gl_FragColor
27
#endif
23 28

  
24 29
//////////////////////////////////////////////////////////////////////////////////////////////
25 30

  
26 31
void main()                    		
27 32
  {
28
  fragColor = vec4(1.0,1.0,1.0,1.0);
33
  FRAG_COLOR = vec4(1.0,1.0,1.0,1.0);
29 34
  }
src/main/res/raw/feedback_vertex_shader.glsl
19 19

  
20 20
precision lowp float;
21 21

  
22
#if USEPOINTS == 1
22
#if __VERSION__ != 100
23 23
in float inValue;
24 24
out float outValue;
25 25
#else
26
in vec3 inValue;
27
out vec3 outValue;
26
attribute float inValue;
27
varying float outValue;
28 28
#endif
29 29

  
30 30
//////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff