Project

General

Profile

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

examples / src / main / java / org / distorted / examples / fov / FOVSurfaceView.java @ 5068fa06

1

    
2
package org.distorted.examples.fov;
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 FOVSurfaceView extends GLSurfaceView 
12
{
13
    private FOVRenderer renderer;
14
   
15
///////////////////////////////////////////////////////////////////////////////////////////////////
16
   
17
    public FOVSurfaceView(Context c, AttributeSet attrs) 
18
      {
19
      super(c, attrs);
20
    
21
      if(!isInEditMode())
22
        {
23
        setEGLContextClientVersion(2);
24
        
25
        if( Build.FINGERPRINT.startsWith("generic") )
26
          { 
27
          setEGLConfigChooser(8, 8, 8, 8, 16, 0);   
28
          }
29
    
30
        renderer = new FOVRenderer(this);
31
        setRenderer(renderer);
32
        }
33
      }
34

    
35
}
36
///////////////////////////////////////////////////////////////////////////////////////////////////
37

    
(3-3/3)