Пример #1
0
  // Setup
  protected void onCreate(Bundle savedInstanceState) {
    // Log.v("SDL", "onCreate()");
    super.onCreate(savedInstanceState);

    // So we can call stuff from static callbacks
    mSingleton = this;

    // Set up the surface
    mSurface = new SDLSurface(getApplication());
    setContentView(mSurface);
    SurfaceHolder holder = mSurface.getHolder();
    holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
  }
Пример #2
0
 public static void flipBuffers() {
   mSurface.flipEGL();
 }
Пример #3
0
 public static boolean createGLContext(int majorVersion, int minorVersion) {
   return mSurface.initEGL(majorVersion, minorVersion);
 }