Revision 6f3a9b2a
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new AroundTheWorldRenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/bean/BeanSurfaceView.java | ||
---|---|---|
36 | 36 |
super(context); |
37 | 37 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
38 | 38 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
39 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
40 | 39 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
41 | 40 |
setRenderer(new BeanRenderer(this)); |
42 | 41 |
} |
src/main/java/org/distorted/examples/blur/BlurSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new BlurRenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/catanddog/CatAndDogSurfaceView.java | ||
---|---|---|
35 | 35 |
super(context); |
36 | 36 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
37 | 37 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
38 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
39 | 38 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
40 | 39 |
setRenderer(new CatAndDogRenderer(this)); |
41 | 40 |
} |
src/main/java/org/distorted/examples/check/CheckSurfaceView.java | ||
---|---|---|
39 | 39 |
{ |
40 | 40 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
41 | 41 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
42 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
43 | 42 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
44 | 43 |
setRenderer(new CheckRenderer(this)); |
45 | 44 |
} |
src/main/java/org/distorted/examples/cubes/CubesSurfaceView.java | ||
---|---|---|
49 | 49 |
{ |
50 | 50 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
51 | 51 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
52 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
53 | 52 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
54 | 53 |
mRenderer = new CubesRenderer(this); |
55 | 54 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/deform/DeformSurfaceView.java | ||
---|---|---|
43 | 43 |
{ |
44 | 44 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
45 | 45 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
46 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
47 | 46 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
48 | 47 |
mRenderer = new DeformRenderer(this); |
49 | 48 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsSurfaceView.java | ||
---|---|---|
35 | 35 |
super(context); |
36 | 36 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
37 | 37 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
38 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
39 | 38 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
40 | 39 |
setRenderer(new DifferentBitmapsRenderer(this)); |
41 | 40 |
} |
src/main/java/org/distorted/examples/differenteffects/DifferentEffectsSurfaceView.java | ||
---|---|---|
35 | 35 |
super(context); |
36 | 36 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
37 | 37 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
38 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
39 | 38 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
40 | 39 |
setRenderer(new DifferentEffectsRenderer(this)); |
41 | 40 |
} |
src/main/java/org/distorted/examples/dynamic/DynamicSurfaceView.java | ||
---|---|---|
112 | 112 |
setFocusableInTouchMode(true); |
113 | 113 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
114 | 114 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
115 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
116 | 115 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
117 | 116 |
DynamicRenderer mRenderer = new DynamicRenderer(this); |
118 | 117 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/effectqueue/EffectQueueSurfaceView.java | ||
---|---|---|
89 | 89 |
setFocusableInTouchMode(true); |
90 | 90 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
91 | 91 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
92 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
93 | 92 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
94 | 93 |
|
95 | 94 |
mRenderer = new EffectQueueRenderer(this); |
src/main/java/org/distorted/examples/effects3d/Effects3DSurfaceView.java | ||
---|---|---|
43 | 43 |
{ |
44 | 44 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
45 | 45 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
46 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
47 | 46 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
48 | 47 |
mRenderer = new Effects3DRenderer(this); |
49 | 48 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/fbo/FBOSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new FBORenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/flag/FlagSurfaceView.java | ||
---|---|---|
46 | 46 |
{ |
47 | 47 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
48 | 48 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
49 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
50 | 49 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
51 | 50 |
mRenderer = new FlagRenderer(this); |
52 | 51 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/girl/GirlSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new GirlRenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/listener/ListenerSurfaceView.java | ||
---|---|---|
35 | 35 |
super(context); |
36 | 36 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
37 | 37 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
38 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
39 | 38 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
40 | 39 |
setRenderer(new ListenerRenderer(this)); |
41 | 40 |
} |
src/main/java/org/distorted/examples/matrix3d/Matrix3DSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new Matrix3DRenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/mirror/MirrorSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new MirrorRenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/monalisa/MonaLisaSurfaceView.java | ||
---|---|---|
35 | 35 |
super(context); |
36 | 36 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
37 | 37 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
38 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
39 | 38 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
40 | 39 |
setRenderer(new MonaLisaRenderer(this)); |
41 | 40 |
} |
src/main/java/org/distorted/examples/movingeffects/MovingEffectsSurfaceView.java | ||
---|---|---|
90 | 90 |
setFocusableInTouchMode(true); |
91 | 91 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
92 | 92 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
93 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
94 | 93 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
95 | 94 |
setRenderer(mRenderer); |
96 | 95 |
} |
src/main/java/org/distorted/examples/multiblur/MultiblurSurfaceView.java | ||
---|---|---|
49 | 49 |
{ |
50 | 50 |
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
51 | 51 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
52 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
53 | 52 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
54 | 53 |
mRenderer = new MultiblurRenderer(this); |
55 | 54 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/olimpic/OlimpicSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
|
47 | 46 |
mRenderer = new OlimpicRenderer(this); |
src/main/java/org/distorted/examples/projection/ProjectionSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new ProjectionRenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/quaternion/QuaternionSurfaceView.java | ||
---|---|---|
33 | 33 |
super(context); |
34 | 34 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
35 | 35 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
36 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
37 | 36 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
38 | 37 |
setRenderer(new QuaternionRenderer(this)); |
39 | 38 |
} |
src/main/java/org/distorted/examples/save/SaveSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new SaveRenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/sink/SinkSurfaceView.java | ||
---|---|---|
33 | 33 |
super(context); |
34 | 34 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
35 | 35 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
36 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
37 | 36 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
38 | 37 |
setRenderer(new SinkRenderer(this)); |
39 | 38 |
} |
src/main/java/org/distorted/examples/starwars/StarWarsSurfaceView.java | ||
---|---|---|
35 | 35 |
super(context); |
36 | 36 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
37 | 37 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
38 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
39 | 38 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
40 | 39 |
mRenderer = new StarWarsRenderer(this); |
41 | 40 |
setRenderer(mRenderer); |
src/main/java/org/distorted/examples/wind/WindSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new WindRenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
Also available in: Unified diff
It now automatically chooses OpenGL ES 2.0 and GLSL 100 or OpenGL ES 3.0 and GLSL 300.
Postprocessing effects will not work on OpenGL ES 2.0 contexts.