Trần Đức Tâm
Trần Đức Tâm

Reputation: 4443

Method glFrustumf() on Android

Today, I had the privilege to study OpenGL ES on Android Developer webpage and I run into some issues, understanding a couple of methods.

On Android Developer document: GL10.glFrustumf(float, float, float, float, float, float). It has no description about this function. I searched it on Google but did not get a positive result as well. So I was hoping if anyone within the group can kindly share any document about how to use glFrustumf() method with me?

Second issue: Projection and camera view in OpenGL ES 1.0 It has the following: gl.glFrustumf(-ratio, ratio, -1, 1, 3, 7);

I wonder that why it is 3 and 7 on the last parameter?

Upvotes: 1

Views: 734

Answers (1)

Peter O.
Peter O.

Reputation: 32878

glFrustum is a legacy OpenGL function that sets a projection matrix.

The 3 and 7 specify the distance from the "camera" to the near and far clipping planes, respectively. Objects closer than 3 units or farther than 7 units from the "camera" won't be seen under the frustum matrix.

Upvotes: 1

Related Questions