Project

General

Profile

Download (828 Bytes) Statistics
| Branch: | Revision:

examples / src / main / java / org / distorted / examples / effects3d / Effects3DSurfaceView.java @ 5068fa06

1

    
2
package org.distorted.examples.effects3d;
3

    
4
import android.content.Context;
5
import android.opengl.GLSurfaceView;
6
import android.os.Build;
7
import android.util.AttributeSet;
8

    
9
///////////////////////////////////////////////////////////////////////////////////////////////////
10

    
11
class Effects3DSurfaceView extends GLSurfaceView 
12
{
13
///////////////////////////////////////////////////////////////////////////////////////////////////
14
   
15
    public Effects3DSurfaceView(Context c, AttributeSet attrs) 
16
      {
17
      super(c, attrs);
18
      
19
      if(!isInEditMode())
20
        {
21
        setEGLContextClientVersion(2);
22
        
23
        if( Build.FINGERPRINT.startsWith("generic") )
24
          { 
25
          setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
26
          }
27
        
28
        setRenderer(new Effects3DRenderer(this));
29
        }
30
      }
31
}
32

    
(3-3/3)