gl_PointCoord

From OpenGL Reference
Jump to navigation Jump to search

Contains the coordinate of a fragment within a point.

Declaration[edit]

Description[edit]

gl_PointCoordis a fragment language input variable that contains the two-dimensional coordinates indicating where within a point primitive the current fragment is located. If the current primitive is not a point, then values read fromgl_PointCoordare undefined.

gl_PointCoord.sranges from 0.0 to 1.0 across the point horizontally from left to right. If GL_POINT_SPRITE_COORD_ORIGIN is GL_LOWER_LEFT ,gl_PointCoord.tvaries from 0.0 to 1.0 vertically from bottom to top. Otherwise, if GL_POINT_SPRITE_COORD_ORIGIN is GL_UPPER_LEFT thengl_PointCoord.tvaries from 0.0 to 1.0 vertically from top to bottom. The default value of GL_POINT_SPRITE_COORD_ORIGIN is GL_UPPER_LEFT .


Version Support[edit]

gl_PointCoord 1.1+

See Also[edit]

 gl_FragCoord , gl_FragDepth 


Copyright[edit]

Copyright© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.