Viewport Index

The first of these two variables, gl_ViewportIndex is used to specify which set of viewport parameters will be used to perform the viewport transformation by OpenGL. These parameters are passed to OpenGL by calling glViewportIndexedf() or glViewportIndexedfv() to specify how window x and y coordinates are generated from clip coordinates. Additionally, glDepthRangeIndexed() can be used to specify how the window z coordinate is generated. The prototypes of these functions are as follows:

Get OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.