package net.ddns.mahaljsp.opengl_glsurfaceview;

import android.opengl.GLSurfaceView;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
/**
 * Created by Thomas Wu(mahaljsp@gmail.com) on 2017/1/10.
 */
public class MainActivity extends AppCompatActivity {
    GLSurfaceView view;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        view=new GLSurfaceView(this);
        view.setEGLContextClientVersion(2); //設定使用OpenGL ES 2的版本
        view.setPreserveEGLContextOnPause(true); //螢幕旋轉時不重複產生GL Context
        view.setRenderer(new MyRenderer()); //設定Render
        setContentView(view);
    }
}
