matrix: adds 2d view transform conveniences
authorRobert Bragg <robert@linux.intel.com>
Tue, 8 Feb 2011 15:21:41 +0000 (15:21 +0000)
committerRobert Bragg <robert@linux.intel.com>
Mon, 7 Mar 2011 13:26:19 +0000 (13:26 +0000)
commitca30ac783568b71beaddfd5139c83598eda97980
tree4451d465f6af1bf933df4afb19fcba727f4a10c5
parent1431b777479736242698b419001d4f8665171c52
matrix: adds 2d view transform conveniences

This adds two new experimental functions to cogl-matrix.c:
cogl_matrix_view_2d_in_perspective and cogl_matrix_view_2d_in_frustum
which can be used to setup a view transform that maps a 2D coordinate
system (0,0) top left and (width,height) bottom right to the current
viewport.

Toolkits such as Clutter that want to mix 2D and 3D drawing can use
these APIs to position a 2D coordinate system at an arbitrary depth
inside a 3D perspective projected viewing frustum.
clutter/cogl/cogl/cogl-matrix.c
clutter/cogl/cogl/cogl-matrix.h