Project

General

Profile

« Previous | Next » 

Revision c25273e0

Added by Leszek Koltunski almost 6 years ago

Standarize GLSL version across the whole library.

View differences:

src/main/java/org/distorted/library/main/Distorted.java
35 35
 */
36 36
public class Distorted 
37 37
  {
38
  static int GLSL;
39
  static String GLSL_VERSION;
38
  public static final int GLSL = 310;
39
  public static final String GLSL_VERSION= "#version 310 es\n";
40 40
  /**
41 41
   * When creating an instance of a DistortedTexture from another instance, clone the Bitmap that's
42 42
   * backing up our DistortedTexture.
......
128 128
    android.util.Log.e("DISTORTED", "GL Vendor "   +GLES31.glGetString(GLES31.GL_VENDOR));
129 129
    android.util.Log.e("DISTORTED", "GL Renderer " +GLES31.glGetString(GLES31.GL_RENDERER));
130 130
    */
131
    GLSL = ( (configurationInfo.reqGlEsVersion>>16)>=3 ? 310 : 100 );
132
    GLSL_VERSION= (GLSL==100 ? "#version 100\n" : "#version 310 es\n");
133

  
134 131
    EffectMessageSender.startSending();
135 132

  
136 133
    final Resources resources = context.getResources();
137
    DistortedEffects.createProgram(resources);
134
    DistortedEffects.createPrograms(resources);
135
    DistortedEffects.createProgramsOIT(resources);
138 136
    PostprocessEffect.createPrograms();
139 137

  
140 138
    mInitialized = true;

Also available in: Unified diff