1234567891011121314151617181920212223 |
- package de.tudarmstadt.informatik.hostage.ui2.fragment.opengl;
- import android.content.Context;
- import android.graphics.PixelFormat;
- import android.opengl.GLSurfaceView;
- import android.util.AttributeSet;
- import android.util.Log;
- public class HomeGLSurfaceView extends GLSurfaceView {
- public HomeGLSurfaceView(Context context) { // won't be called
- super(context);
- Log.e("gl", "called wrong constructor (w/o attributes)");
- }
- public HomeGLSurfaceView(Context context, AttributeSet attrs) { // will be called
- super(context, attrs);
- setEGLContextClientVersion(2); // OpenGL ES 2.0
- setZOrderOnTop(true);
- setEGLConfigChooser(8, 8, 8, 8, 16, 0);
- getHolder().setFormat(PixelFormat.RGBA_8888);
- setRenderer(new ThreatIndicatorGLRenderer());
- }
- }
|