1
|
|
2
|
package org.distorted.examples.quaternion;
|
3
|
|
4
|
import android.content.Context;
|
5
|
import android.opengl.GLSurfaceView;
|
6
|
import android.os.Build;
|
7
|
|
8
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9
|
|
10
|
class QuaternionSurfaceView extends GLSurfaceView
|
11
|
{
|
12
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
13
|
|
14
|
public QuaternionSurfaceView(Context c)
|
15
|
{
|
16
|
super(c);
|
17
|
|
18
|
if(!isInEditMode())
|
19
|
{
|
20
|
setEGLContextClientVersion(2);
|
21
|
|
22
|
if( Build.FINGERPRINT.startsWith("generic") )
|
23
|
{
|
24
|
setEGLConfigChooser(8, 8, 8, 8, 16, 0);
|
25
|
}
|
26
|
|
27
|
setRenderer(new QuaternionRenderer(this));
|
28
|
}
|
29
|
}
|
30
|
}
|
31
|
|