HomeGLSurfaceView.java 756 B

1234567891011121314151617181920212223
  1. package de.tudarmstadt.informatik.hostage.ui2.fragment.opengl;
  2. import android.content.Context;
  3. import android.graphics.PixelFormat;
  4. import android.opengl.GLSurfaceView;
  5. import android.util.AttributeSet;
  6. import android.util.Log;
  7. public class HomeGLSurfaceView extends GLSurfaceView {
  8. public HomeGLSurfaceView(Context context) { // won't be called
  9. super(context);
  10. Log.e("gl", "called wrong constructor (w/o attributes)");
  11. }
  12. public HomeGLSurfaceView(Context context, AttributeSet attrs) { // will be called
  13. super(context, attrs);
  14. setEGLContextClientVersion(2); // OpenGL ES 2.0
  15. setZOrderOnTop(true);
  16. setEGLConfigChooser(8, 8, 8, 8, 16, 0);
  17. getHolder().setFormat(PixelFormat.RGBA_8888);
  18. setRenderer(new ThreatIndicatorGLRenderer());
  19. }
  20. }