Skip to content

Commit

Permalink
setSurface null onPause
Browse files Browse the repository at this point in the history
  • Loading branch information
ashqal committed Jun 30, 2016
1 parent 5be9b60 commit fcb3b2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public void onPrepared(IMediaPlayer mp) {
}

public void onPause() {
mPlayer.setSurface(null);
pause();
}

Expand Down
7 changes: 3 additions & 4 deletions vrlib/src/main/java/com/asha/vrlib/MD360Renderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,15 @@ public void onSurfaceChanged(GL10 glUnused, int width, int height){

@Override
public void onDrawFrame(GL10 glUnused){
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
// mFps.step();

MDAbsObject3D object3D = mProjectionModeManager.getObject3D();

// check obj3d
if (object3D == null) return;

boolean updated = mTexture.updateTexture();
if(updated){
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
// mFps.step();

int size = mDisplayModeManager.getVisibleSize();
int itemWidth = (int) (this.mWidth * 1.0f / size);
List<MD360Director> directors = mProjectionModeManager.getDirectors();
Expand Down

0 comments on commit fcb3b2c

Please sign in to comment.