Project

General

Profile

« Previous | Next » 

Revision 6f3a9b2a

Added by Leszek Koltunski about 7 years ago

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.

View differences:

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);

Also available in: Unified diff