screenspace(3G) screenspace(3G)
screenspace - map world space to absolute screen coordinates
void screenspace()
none
screenspace sets the projection matrix and viewport of the current window
so as to map world space to absolute screen coordinates (instead of to
the more usual window-relative screen coordinates). This provides a
convenient coordinate system for operations that are not constrained to a
window, e.g. reading pixels.
screenspace is equivalent to:
long xmin, ymin;
getorigin(&xmin, &ymin);
viewport(-xmin, getgdesc(GD_XPMAX)-xmin,
-ymin, getgdesc(GD_YPMAX)-ymin);
ortho2(-0.5, getgdesc(GD_XPMAX)+0.5,
-0.5, getgdesc(GD_YPMAX)+0.5);
fullscrn, getgdesc, getorigin, viewport, ortho2
This routine is available only in immediate mode.
PPPPaaaaggggeeee 1111 [ Back ]
|