Export to GitHub

glextensions - GL_EXT_compiled_vertex_array.wiki


Contents

Dependencies

None

Overview

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 commands. 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 commands each of which operate on 2 x N vertexes. Each DrawElements command after the first will share N vertexes with the preceding DrawElements command. If the vertex array data is locked while the DrawElements commands are executed, then OpenGL may be able to transform each of these shared vertexes just once.

New Procedures and Functions

void LockArraysEXT (int first, sizei count) void UnlockArraysEXT (void)

New Tokens

Accepted by the

<pname>

parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev:

|ARRAY_ELEMENT_LOCK_FIRST_EXT | 0x81A8| |:-----------------------------------|:---------| |ARRAY_ELEMENT_LOCK_COUNT_EXT | 0x81A9|

Errors

INVALID_VALUE is generated if LockArrarysEXT parameter

<first>

is less than zero.

INVALID_VALUE is generated if LockArraysEXT parameter

<count>

is less than or equal to zero.

INVALID_OPERATION is generated if LockArraysEXT is called between execution of LockArraysEXT and corresponding execution of UnlockArraysEXT.

INVALID_OPERATION is generated if UnlockArraysEXT is called without a corresponding previous execution of LockArraysEXT.

INVALID_OPERATION is generated if LockArraysEXT or UnlockArraysEXT is called between execution of Begin and the corresponding execution of End.

New State

| Get Value | Get Command | Type | Initial Value | |:--------------|:------------------|:---------|:------------------| |ARRAY_ELEMENT_LOCK_FIRST_EXT | GetIntegerv | Z+ | 0 | |ARRAY_ELEMENT_LOCK_COUNT_EXT | GetIntegerv | Z+ | 0 |

New Implementation Dependent State

None