GL_OES_geometry_point_size#

Supported Hardware#

Series6XT

Valid APIs#

OpenGL ES 3.1

Description#

This extension adds programmable point size to the geometry shader and allows resizing of generated point sprites that come through as input - useful for things like particle effects.

Example#

#extension GL_OES_geometry_shader : require
#extension GL_OES_geometry_point_size : require
#extension GL_OES_shader_io_blocks : require
// Take in point primitives.
layout(points) in;
// Output up to 1 line primitive - needs at least two vertices (one line).
layout(points, max_vertices = 1) out;
void main()
{
    // Re-emit the point primitive - at twice the size
    gl_Position = gl_in[0].gl_Position + vec4(0.0,-0.1, 0.0, 0.0);
    gl_PointSize = gl_in[0].gl_PointSize * 2.0f;
    EmitVertex();
    // End the (point) primitive
    EndPrimitive();
}