Project

General

Profile

« Previous | Next » 

Revision 341151fc

Added by Leszek Koltunski about 6 years ago

Fixes ported from the 'OIT' branch:

- remove counting of transparent pixels
- various fixes for the Mali GPU

View differences:

src/main/java/org/distorted/library/program/DistortedProgram.java
292 292
      final int[] compileStatus = new int[1];
293 293
      GLES31.glGetShaderiv(shaderHandle, GLES31.GL_COMPILE_STATUS, compileStatus, 0);
294 294

  
295
      if (compileStatus[0] != GLES31.GL_TRUE )
295
      if (compileStatus[0] != GLES31.GL_TRUE)
296 296
        {
297
        GLES31.glDeleteShader(shaderHandle);
298
        shaderHandle = 0;
299
        }
300
      }
297
        String error = GLES31.glGetShaderInfoLog(shaderHandle);
301 298

  
302
    if (shaderHandle == 0)
303
      {
304
      String error = GLES31.glGetShaderInfoLog(shaderHandle);
299
        //android.util.Log.e("Program", "error compiling :" + error);
305 300

  
306
      //android.util.Log.e("Program", "error compiling :"+error);
301
        GLES31.glDeleteShader(shaderHandle);
307 302

  
308
      switch(shaderType)
309
        {
310
        case GLES31.GL_VERTEX_SHADER  : throw new VertexCompilationException(error);
311
        case GLES31.GL_FRAGMENT_SHADER: throw new FragmentCompilationException(error);
312
        default                       : throw new RuntimeException(error);
303
        switch (shaderType)
304
          {
305
          case GLES31.GL_VERTEX_SHADER:   throw new VertexCompilationException(error);
306
          case GLES31.GL_FRAGMENT_SHADER: throw new FragmentCompilationException(error);
307
          default:                        throw new RuntimeException(error);
308
          }
313 309
        }
314 310
      }
315 311

  

Also available in: Unified diff