GL_OES_point_size_array#

Supported Hardware#

Series5, Series5XT, Series6, Series6XE, Series6XT

Valid APIs#

OpenGL ES 1.x

Description#

Points are usually rendered at a fixed size by OpenGL ES, according to the value set by glPointSize. This size is applied uniformly to all rendered points, which limits their capabilities. This extension adds the ability to use an array of values instead, so that each point can have different sizes.

Note#

This functionality is core to OpenGL ES 2.0 and 3.0.

Example#

// Setup an array of points to be rendered - three in this case
GLfloat pointPositions[] =
{
     0.4f, 0.7f, 0.2f,
     0.1f,-0.5f, 0.2f,
    -0.0f, 0.7f, 0.2f
};
// Set the vertex pointer as normal
glVertexPointer(3, GL_FLOAT, 0, pointPositions);
// Enable the vertex array
glEnableClientState(GL_VERTEX_ARRAY);
// Create an array of sizes for these points
GLfloat pointSizes[] =
{
    1.0f,
    2.0f,
    0.7f
};
// Set the point sizes via this extension
glPointSizePointerOES(3, GL_FLOAT, 0, pointPositions);
// Enable the point size array
glEnableClientState(GL_POINT_SIZE_ARRAY_OES);
// Draw the points
glDraw(GL_POINTS, ...);