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 the O’Reilly learning platform.

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