[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

gluProject Subroutine

Purpose

Maps object coordinates to window coordinates.

Library

OpenGL C bindings library: libGL.a

C Syntax

int gluProject(GLdouble ObjectX, 
   GLdouble ObjectY, 
   GLdouble ObjectZ, 
   const GLdouble ModelMatrix[16}, 
   const GLdouble ProjectMatrix[16], 
   const GLint Viewport[4], 
   GLdouble *WindowX, 
   GLdouble *WindowY, 
   GLdouble *WindowZ)

Description

The gluProject transforms the specified object space coordinates into window coordinates using the ModelMatrix, ProjectMatrix, and Viewport values provided. The results are stored in WindowX, WindowY, and WindowZ. A return value of GL_TRUE indicates success, and GL_FALSE indicates failure.

Parameters

ObjectX, ObjectY, ObjectZ Specify the object coordinates.
ModelMatrix Specifies the current modelview matrix (as from a glGetDoublev call).
ProjectMatrix Specifies the current projection matrix (as from a glGetDoublev call).
Viewport Specifies the current viewport (as from a glGetIntegerv call).
WindowX, WindowY, WindowZ Returns the computed window coordinates.

Return Values

GL_TRUE Indicates the conversion succeeded.
GL_FALSE Indicates the conversion failed.

Files

/usr/include/GL/gl.h Contains C language constraints, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glGet subroutine, gluUnProject subroutine.

OpenGL Overview.


[ Previous | Next | Contents | Glossary | Home | Search ]