Project

General

Profile

« Previous | Next » 

Revision 94f6d472

Added by Leszek Koltunski about 7 years ago

Make it more flexible; now it can run almost all apps on OpenGL 2.0 contexts; OpenGL 3.0 ( with GLSL 3.00) required for POSTPROCESSING.

View differences:

src/main/java/org/distorted/library/Distorted.java
29 29
 */
30 30
public class Distorted 
31 31
  {
32
  static final String glslVersion="#version 300 es\n";
32
  static int GLSL;
33
  static String GLSL_VERSION;
34

  
33 35
  /**
34 36
   * When creating an instance of a DistortedTexture from another instance, clone the Bitmap that's
35 37
   * backing up our DistortedTexture.
......
104 106
  public static void onCreate(final Context context)
105 107
  throws FragmentCompilationException,VertexCompilationException,VertexUniformsException,FragmentUniformsException,LinkingException
106 108
    {
109
    GLSL = 100;
110
    GLSL_VERSION= (GLSL==100 ? "#version 100\n" : "#version 300 es\n");
111

  
107 112
    final Resources resources = context.getResources();
108 113
    DistortedEffects.createProgram(resources);
109 114
    EffectQueuePostprocess.createProgram(resources);

Also available in: Unified diff