ExampleEngine icon indicating copy to clipboard operation
ExampleEngine copied to clipboard

GLKMatrix4MakeOrtho invalid farZ

Open marksands opened this issue 13 years ago • 0 comments

According to Apple, GLKMatrix4MakeOrtho's nearZ param must be positive and the farZ param must be positive and greater than the near distance.

Unfortunately, in your EEScene.m file you have:

-(GLKMatrix4)projectionMatrix {
  return GLKMatrix4MakeOrtho(left, right, bottom, top, 1, -1);
}

Consider replacing it with Apple's example:

-(GLKMatrix4)projectionMatrix {
  return GLKMatrix4MakeOrtho(left, right, bottom, top, 0.1, 100.0);
}

marksands avatar Oct 30 '12 05:10 marksands