glViewportIndexedf
glViewportIndexedf is a OpenGL core profile function introduced in version 4.0 that allows setting a single viewport for a specific viewport index in the viewport array. The function prototype is ⟨void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h)⟩. Unlike the legacy glViewport which sets a single viewport for all primitives, glViewportIndexedf targets the viewport array that can contain multiple viewports, enabling advanced rendering techniques such as multi-viewport rendering or per-shader viewport configuration. The index parameter selects the desired viewport in the array, while x and y specify the lower left corner position in window coordinates, and w and h define the width and height of the viewport, all given as floating‑point values. The function only affects vertex processing in all vertex shaders bound to the specified viewport index.
This function is part of the GL_ARB_viewport_array and GL_ARB_viewport_swizzle extensions, which were made core in OpenGL