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.

Parameters

fov_y

Type: float

Vertical field of view angle in degrees.

aspect

Type: float

The (width over height) aspect ratio for display.

z_near

Type: float

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

z_far

Type: float

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