HomeGLSurfaceView.java 788 B

123456789101112131415161718192021222324
  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. // transparency
  17. //setEGLConfigChooser(8, 8, 8, 8, 16, 0);
  18. //getHolder().setFormat(PixelFormat.RGBA_8888);
  19. setRenderer(new ThreatIndicatorGLRenderer());
  20. }
  21. }