[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glLockArraysEXT Subroutine

Purpose

Locks the currently enabled vertex arrays.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glLockArraysEXT (int first, sizei count)

Parameters

first The first element in the locked range.
count The number of elements to be contained in the locked range.

Description

The currently enabled vertex arrays can be locked with the subroutine glLockArraysEXT. When the vertex arrays are locked, the GL can compile the array data or the transformed results of array data associated with the currently enabled vertex arrays. The vertex arrays are unlocked by the glUnlockArraysEXT subroutine.

Between glLockArraysEXT and glUnlockArraysEXT the application should ensure that none of the array data in the range of elements specified by first and count are changed. Changes to the array data between the execution of glLockArraysEXT and glUnlockArraysEXT subroutines may affect calls to DrawArrays, ArrayElement, or DrawElements subroutines in non-sequential ways.

While using a compiled vertex array, references to array elements by the subroutines DrawArrays, ArrayElement, or DrawElements which are outside of the range specified by first and count are undefined.

This extension defines an interface which allows static vertex array data to be cached or pre-compiled for more efficient rendering. This is useful for implementations which can cache the transformed results of array data for reuse by several DrawArrays, ArrayElement, or DrawElements subroutines. It is also useful for implementations which can transfer array data to fast memory for more efficient processing.

For example, rendering an M by N mesh of quadrilaterals can be accomplished by setting up vertex arrays containing all of the vertexes in the mesh and issuing M DrawElements subroutines each of which operate on 2 * N vertexes. Each DrawElements subroutine after the first will share N vertexes with the preceding DrawElements subroutine. If the vertex array data is locked while the DrawElements subroutines are executed, then OpenGL may be able to transform each of these shared vertexes just once.

Errors

INVALID_VALUE First is less than or equal to zero.
INVALID_OPERATION The glLockArraysEXT subroutine is called between execution of glLockArraysEXT and the corresponding execution of glUnlockArraysEXT.
INVALID_OPERATION The glLockArraysEXT subroutine is called between execution of Begin and the corresponding execution of End.

Related Information

The glUnlockArraysEXT subroutine.

OpenGL Overview.


[ Previous | Next | Contents | Glossary | Home | Search ]