Method

CoglFramebufferperspective

Declaration [src]

void
cogl_framebuffer_perspective (
  CoglFramebuffer* framebuffer,
  float fov_y,
  float aspect,
  float z_near,
  float z_far
)

Description [src]

Replaces the current projection matrix with a perspective matrix based on the provided values.

You should be careful not to have to great a z_far / z_near ratio since that will reduce the effectiveness of depth testing since there won’t be enough precision to identify the depth of objects near to each other.

Stability:Unstable
Available since:1.10

Parameters

fov_y float
 

Vertical field of view angle in degrees.

aspect float
 

The (width over height) aspect ratio for display.

z_near float
 

The distance to the near clipping plane (Must be positive, and must not be 0)

z_far float
 

The distance to the far clipping plane (Must be positive)