4.1.3.9. PrimitiveVertexArray

This modules provides tools to draw segments and rectangles primitives.

The aim of these classes has to be used by a Geometry Shader.

class PyOpenGLng.HighLevelApi.PrimitiveVertexArray.GlLinesVertexArray(objects=None)[source]

Bases: PyOpenGLng.HighLevelApi.VertexArrayObject.GlVertexArrayObject

Base class to draw primitives as lines.

bind_to_shader(shader_program_interface_attribute)[source]

Bind the vertex array to the shader program interface attribute.

draw()[source]

Draw the vertex array as lines.

set(objects)[source]
class PyOpenGLng.HighLevelApi.PrimitiveVertexArray.GlRectangleVertexArray(rectangles=None)[source]

Bases: PyOpenGLng.HighLevelApi.PrimitiveVertexArray.GlLinesVertexArray

Base class to draw rectangles primitives as lines.

set(rectangles)[source]

Set the vertex array from an iterable of rectangles.

class PyOpenGLng.HighLevelApi.PrimitiveVertexArray.GlSegmentVertexArray(segments=None)[source]

Bases: PyOpenGLng.HighLevelApi.PrimitiveVertexArray.GlLinesVertexArray

Base class to draw segments primitives as lines.

_logger = <logging.Logger object at 0x56fdc10>
set(segments)[source]

Set the vertex array from an iterable of segments.

class PyOpenGLng.HighLevelApi.PrimitiveVertexArray.TriangleVertexArray(items=None)

Bases: PyOpenGLng.HighLevelApi.VertexArrayObject.GlVertexArrayObject

Base class to draw primitives as triangles.

bind_to_shader(shader_program_interface)

Bind the vertex array to the shader program interface attribute.

draw()

Draw the vertex array as lines.

set(positions, normals, colours)

Set the vertex array from an iterable of triangles.

Previous topic

4.1.3.8. Ortho2D

Next topic

4.1.3.10. RandomTexture

This Page