"""
This module defines enumeration classes mapping various OpenGL constants
to more easily readable and manageable Python enumerations. These enums
facilitate interactions with OpenGL by providing structured and semantically
meaningful groupings for matrix modes, clip planes, bit masks, data types,
usage hints, buffer targets, and draw primitives.
Each enumeration corresponds to a specific set of OpenGL constants and can
be directly utilized when working with OpenGL APIs.
"""
from enum import IntEnum
from OpenGL.GL import (
GL_LINE_LOOP,
GL_LINE_STRIP,
GL_LINE_STRIP_ADJACENCY,
GL_LINES,
GL_LINES_ADJACENCY,
GL_PATCHES,
GL_POLYGON,
GL_QUAD_STRIP,
GL_QUADS,
GL_TRIANGLE_STRIP,
GL_TRIANGLE_STRIP_ADJACENCY,
GL_TRIANGLES,
GL_TRIANGLES_ADJACENCY,
)
from OpenGL.raw.GL.VERSION.GL_1_0 import GL_POINTS
[docs]
class GLDrawMode(IntEnum):
"""gl Draw Mode"""
[docs]
QUAD_STRIP = GL_QUAD_STRIP
[docs]
TRIANGLE_STRIP = GL_TRIANGLE_STRIP
[docs]
TRIANGLES = GL_TRIANGLES
[docs]
LINE_STRIP = GL_LINE_STRIP
[docs]
LINE_LOOP = GL_LINE_LOOP
[docs]
LINE_STRIP_ADJACENCY = GL_LINE_STRIP_ADJACENCY
[docs]
LINES_ADJACENCY = GL_LINES_ADJACENCY
[docs]
TRIANGLE_STRIP_ADJACENCY = GL_TRIANGLE_STRIP_ADJACENCY
[docs]
TRIANGLES_ADJACENCY = GL_TRIANGLES_ADJACENCY
@classmethod
[docs]
def choices(cls):
return [m.value for m in cls]