Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Fix rendering issue on Galaxy s3
Browse files Browse the repository at this point in the history
  • Loading branch information
openaphid committed Jan 17, 2013
1 parent 765dec1 commit 3bd2922
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified FlipView/Demo/APK/Aphid-FlipView-Demo.apk
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ public void onSurfaceChanged(GL10 gl, int width, int height) {
float fovy = 20f;
float eyeZ = height / 2f / (float) Math.tan(TextureUtils.d2r(fovy / 2));

GLU.gluPerspective(gl, fovy, (float) width / (float) height, 0.5f, Math.max(2500.0f, eyeZ));
GLU.gluPerspective(gl, fovy, (float) width / (float) height, 0.5f, eyeZ + height / 2); //set zFar be larger than eyeZ to fix issue #5

gl.glMatrixMode(GL_MODELVIEW);
gl.glLoadIdentity();

GLU.gluLookAt(gl,
width / 2.0f, height / 2f, eyeZ,
width / 2.0f, height / 2.0f, 0.0f,
width / 2f, height / 2f, eyeZ,
width / 2f, height / 2f, 0.0f,
0.0f, 1.0f, 0.0f
);

Expand Down

0 comments on commit 3bd2922

Please sign in to comment.