Module gl_utils::camera2d[][src]

Types and functions for 2D rendering

Structs

Camera2d

Represents a camera ("view") positioned and oriented in a 2D scene with a 2D transformation and a 2D projection

Functions

ndc_2d_to_screen_2d

Maps OpenGL NDC coordinates to screen coordinates based on a given screen resolution.

screen_2d_to_ndc_2d

Convert screen coordinate to OpenGL NDC based on a given screen resolution.

transform_mat_world_to_view

Builds a 4x4 transformation matrix that will transform points in world space coordinates to view space coordinates based on the current 2D view position and orientation.