Project

General

Profile

« Previous | Next » 

Revision b7074bc6

Added by Leszek Koltunski about 4 years ago

Lower requirements - now only OpenGL ES 3.0 is required; if running on such platform, OIT part of the API ( which is the only one which actually requires 3.1) is switched off.

View differences:

src/main/java/org/distorted/library/effect/PostprocessEffect.java
79 79
  private static ArrayList<Source> mSources = new ArrayList<>();
80 80
  private static int mNumSources = 0;
81 81

  
82
  private class Job
82
  private static class Job
83 83
    {
84 84
    int type;
85 85
    int level;
......
92 92
    }
93 93

  
94 94
  private ArrayList<Job> mJobs = new ArrayList<>();
95
  private int mQualityLevel;
95 96

  
96
  int mQualityLevel;
97 97
  float mQualityScale;
98 98

  
99 99
///////////////////////////////////////////////////////////////////////////////////////////////////
......
111 111
 *
112 112
 * @y.exclude
113 113
 */
114
  public static void createPrograms()
114
  public static void createPrograms(int GLSL)
115 115
    {
116 116
    Source source;
117 117
    int len = mSources.size();
118 118

  
119
    String version = "#version "+GLSL+" es\n";
120

  
119 121
    for(int i=0; i<len; i++)
120 122
      {
121 123
      source = mSources.remove(0);
122 124

  
123
      //android.util.Log.d("postprocess", "compiling: "+source.mName);
124

  
125 125
      try
126 126
        {
127
        mPrograms.add (new DistortedProgram(source.mVertexShader,source.mFragmentShader));
127
        mPrograms.add (new DistortedProgram(version+source.mVertexShader,version+source.mFragmentShader));
128 128
        }
129 129
      catch(Exception e)
130 130
        {

Also available in: Unified diff