|
@@ -122,8 +122,8 @@ import javax.microedition.khronos.opengles.GL10;
|
|
|
* <p>
|
|
|
* <h3>Activity Life-cycle</h3>
|
|
|
* A GLSurfaceView must be notified when to pause and resume rendering. GLSurfaceView clients
|
|
|
- * are required to call {@link #onPause()} when the activity stops and
|
|
|
- * {@link #onResume()} when the activity starts. These calls allow GLSurfaceView to
|
|
|
+ * are required to call {@link #pauseGLThread()} when the activity stops and
|
|
|
+ * {@link #resumeGLThread()} when the activity starts. These calls allow GLSurfaceView to
|
|
|
* pause and resume the rendering thread, and also allow GLSurfaceView to release and recreate
|
|
|
* the OpenGL display.
|
|
|
* <p>
|
|
@@ -339,8 +339,8 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
|
|
|
* setRenderer is called:
|
|
|
* <ul>
|
|
|
* <li>{@link #getRenderMode()}
|
|
|
- * <li>{@link #onPause()}
|
|
|
- * <li>{@link #onResume()}
|
|
|
+ * <li>{@link #pauseGLThread()}
|
|
|
+ * <li>{@link #resumeGLThread()}
|
|
|
* <li>{@link #queueEvent(Runnable)}
|
|
|
* <li>{@link #requestRender()}
|
|
|
* <li>{@link #setRenderMode(int)}
|
|
@@ -568,6 +568,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
|
|
|
}
|
|
|
|
|
|
|
|
|
+ // -- GODOT start --
|
|
|
/**
|
|
|
* Pause the rendering thread, optionally tearing down the EGL context
|
|
|
* depending upon the value of {@link #setPreserveEGLContextOnPause(boolean)}.
|
|
@@ -578,22 +579,23 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
|
|
|
*
|
|
|
* Must not be called before a renderer has been set.
|
|
|
*/
|
|
|
- public void onPause() {
|
|
|
+ protected final void pauseGLThread() {
|
|
|
mGLThread.onPause();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Resumes the rendering thread, re-creating the OpenGL context if necessary. It
|
|
|
- * is the counterpart to {@link #onPause()}.
|
|
|
+ * is the counterpart to {@link #pauseGLThread()}.
|
|
|
*
|
|
|
* This method should typically be called in
|
|
|
* {@link android.app.Activity#onStart Activity.onStart}.
|
|
|
*
|
|
|
* Must not be called before a renderer has been set.
|
|
|
*/
|
|
|
- public void onResume() {
|
|
|
+ protected final void resumeGLThread() {
|
|
|
mGLThread.onResume();
|
|
|
}
|
|
|
+ // -- GODOT end --
|
|
|
|
|
|
/**
|
|
|
* Queue a runnable to be run on the GL rendering thread. This can be used
|