Signature
Parameters
Description
glPrimitiveBoundingBox
specifies a clip space bounding box which may allow
implementations to optimize performance if the application
provides bounds of primitives that will be generated by the tessellation
primitive generator or the geometry shader prior to executing those stages.
If the provided bounds are incorrect and primitives extend beyond them, the
rasterizer may or may not generate fragments for the portions of primitives
outside the bounds.
The bounding box in clip space is composed of 16 vertices formed by all
combinations of the minimum and maximum values for each dimension. This
bounding box is clipped against
and projected to three dimensions
by dividing
,
, and
by
for each vertex. The viewport transform
is then applied to each vertex to produce a three-dimensional bounding
volume in window coordinates. The window space bounding volume is expanded in the X and Y dimensions to
accommodate the rasterization rules for the primitive type, and to fall on
fragment boundaries.
If tessellation is active, each invocation of the tessellation control
shader may re-specify the bounding box by writing to the built-in
gl_BoundingBox
[] variable.
If the shader statically assigns a value to
any part of this variable, then gl_BoundingBox[0] is used instead of
minX
,
minY
,
minZ
,
minW
, and gl_BoundingBox[1] is used instead of
maxX
,
maxY
,
maxZ
,
maxW
. If the shader contains a static assignment
to gl_BoundingBox[] and there is an execution path through the shader
that does not write all components of gl_BoundingBox[], the value of
unwritten components and corresponding bounding box coordinates is undefined
for executions of the shader that take that path.
Associated Gets
glGet
with argument
GL_PRIMITIVE_BOUNDING_BOX
API Version Support
glPrimitiveBoundingBox |
Copyright
Copyright
2015 Khronos Group.
This document is licensed under the SGI Free Software B License.
For details, see
http://oss.sgi.com/projects/FreeB/
.