| 1 |
427ab7bf
|
Leszek Koltunski
|
|
| 2 |
|
|
package org.distortedandroid.examples.monalisa;
|
| 3 |
|
|
|
| 4 |
|
|
import android.content.Context;
|
| 5 |
|
|
import android.opengl.GLSurfaceView;
|
| 6 |
|
|
import android.os.Build;
|
| 7 |
|
|
|
| 8 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 9 |
|
|
|
| 10 |
|
|
class MonaLisaSurfaceView extends GLSurfaceView
|
| 11 |
|
|
{
|
| 12 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 13 |
|
|
|
| 14 |
|
|
public MonaLisaSurfaceView(Context context)
|
| 15 |
|
|
{
|
| 16 |
|
|
super(context);
|
| 17 |
|
|
setEGLContextClientVersion(2);
|
| 18 |
|
|
|
| 19 |
|
|
if( Build.FINGERPRINT.startsWith("generic") )
|
| 20 |
|
|
{
|
| 21 |
|
|
setEGLConfigChooser(8, 8, 8, 8, 16, 0);
|
| 22 |
|
|
}
|
| 23 |
|
|
|
| 24 |
|
|
setRenderer(new MonaLisaRenderer(this));
|
| 25 |
|
|
}
|
| 26 |
|
|
}
|