Package glitter :: Package utils :: Module constants
[hide private]
[frames] | no frames]

Module constants

source code

Constants and enums.


To Do: Add internal formats GL_DEPTH_COMPONENT and GL_DEPTH_STENCIL to texture_formats.

Author: Stephan Wenger

Date: 2012-02-29

Variables [hide private]
  texture_formats = [((uint8, 1), GL_R8UI(33330), (GL_UNSIGNED_B...
Mapping between numpy types and OpenGL types.
  dtype_to_gl_iformat = {(uint8, 1): GL_R8UI(33330), (uint8, 2):...
  gl_iformat_to_dtype = {GL_R32F(33326): (float32, 1), GL_RG32F(...
  dtype_to_gl_format = {(uint8, 1): GL_RED_INTEGER(36244), (uint...
  gl_format_to_dtype = {GL_RED(6403): (float32, 1), GL_RGB(6407)...
  gl_iformat_to_gl_type = {GL_R32F(33326): GL_FLOAT(5126), GL_RG...
  texture_compare_funcs = Enum(NEVER, LESS, EQUAL, LEQUAL, GREAT...
  texture_compare_modes = Enum(NONE, COMPARE_REF_TO_TEXTURE)
  texture_min_filters = Enum(NEAREST, LINEAR, NEAREST_MIPMAP_LIN...
  texture_mag_filters = Enum(NEAREST, LINEAR)
  texture_swizzles = Enum(ZERO, ONE, RED, GREEN, BLUE, ALPHA)
  texture_wrapmodes = Enum(MIRRORED_REPEAT, REPEAT, CLAMP_TO_BOR...
  primitive_types = Enum(POINTS, LINES, LINE_LOOP, LINE_STRIP, T...
  buffer_usages = Enum(STREAM_DRAW, STREAM_READ, STREAM_COPY, ST...
  buffer_dimensions_to_primitive = {1: POINTS, 2: LINES, 3: TRIA...
  primitive_to_buffer_dimensions = {LINES: 2, POINTS: 1, TRIANGL...
  blend_functions = Enum(SRC_COLOR, ONE_MINUS_SRC_COLOR, ONE_MIN...
  blend_equations = Enum(MAX, SUBTRACT, REVERSE_SUBTRACT, ADD, MIN)
  depth_functions = Enum(NEVER, LESS, EQUAL, LEQUAL, GREATER, NO...
  draw_buffers = Enum(NONE, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, ...
  hints = Enum(DONT_CARE, FASTEST, NICEST)
  provoking_vertices = Enum(UNDEFINED, FIRST, LAST, PROVOKING)
  logic_op_modes = Enum(CLEAR, AND, AND_REVERSE, COPY, AND_INVER...
  provoke_modes = Enum(FIRST_VERTEX_CONVENTION, LAST_VERTEX_CONV...
  color_read_formats = Enum(BGR, STENCIL_INDEX, DEPTH_COMPONENT,...
  color_read_types = Enum(BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_S...
  read_buffers = Enum(NONE, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, ...
  transform_feedback_buffer_modes = Enum(INTERLEAVED_ATTRIBS, SE...
  client_wait_sync_returns = Enum(ALREADY_SIGNALED, TIMEOUT_EXPI...
  framebuffer_status = Enum(INCOMPLETE_MULTISAMPLE, INCOMPLETE_L...
  cull_face_modes = Enum(FRONT_AND_BACK, FRONT, BACK)
  front_face_modes = Enum(CW, CCW)
  polygon_modes = Enum(POINT, LINE, FILL)
  __package__ = 'glitter.utils'
  key = 'GL_RGB10_A2UI'
  value = GL_RGB10_A2UI(36975)
Variables Details [hide private]

texture_formats

Mapping between numpy types and OpenGL types.

First column: numpy datatype, number of color channels Second column: OpenGL internal format Third column: OpenGL type, OpenGL format

Value:
[((uint8, 1),
  GL_R8UI(33330),
  (GL_UNSIGNED_BYTE(5121), GL_RED_INTEGER(36244))),
 ((int8, 1), GL_R8I(33329), (GL_BYTE(5120), GL_RED_INTEGER(36244))),
 ((uint16, 1),
  GL_R16UI(33332),
  (GL_UNSIGNED_SHORT(5123), GL_RED_INTEGER(36244))),
 ((int16, 1), GL_R16I(33331), (GL_SHORT(5122), GL_RED_INTEGER(36244)))\
...

dtype_to_gl_iformat

Value:
{(uint8, 1): GL_R8UI(33330),
 (uint8, 2): GL_RG8UI(33336),
 (uint8, 3): GL_RGB8UI(36221),
 (uint8, 4): GL_RGBA8UI(36220),
 (uint16, 1): GL_R16UI(33332),
 (uint16, 2): GL_RG16UI(33338),
 (uint16, 3): GL_RGB16UI(36215),
 (uint16, 4): GL_RGBA16UI(36214),
...

gl_iformat_to_dtype

Value:
{GL_R32F(33326): (float32, 1),
 GL_RG32F(33328): (float32, 2),
 GL_R8I(33329): (int8, 1),
 GL_R8UI(33330): (uint8, 1),
 GL_R16I(33331): (int16, 1),
 GL_R16UI(33332): (uint16, 1),
 GL_R32I(33333): (int32, 1),
 GL_R32UI(33334): (uint32, 1),
...

dtype_to_gl_format

Value:
{(uint8, 1): GL_RED_INTEGER(36244),
 (uint8, 2): GL_RG_INTEGER(33320),
 (uint8, 3): GL_RGB_INTEGER(36248),
 (uint8, 4): GL_RGBA_INTEGER(36249),
 (uint16, 1): GL_RED_INTEGER(36244),
 (uint16, 2): GL_RG_INTEGER(33320),
 (uint16, 3): GL_RGB_INTEGER(36248),
 (uint16, 4): GL_RGBA_INTEGER(36249),
...

gl_format_to_dtype

Value:
{GL_RED(6403): (float32, 1),
 GL_RGB(6407): (float32, 3),
 GL_RGBA(6408): (float32, 4),
 GL_RG(33319): (float32, 2),
 GL_RG_INTEGER(33320): (int32, 2),
 GL_RED_INTEGER(36244): (int32, 1),
 GL_RGB_INTEGER(36248): (int32, 3),
 GL_RGBA_INTEGER(36249): (int32, 4)}

gl_iformat_to_gl_type

Value:
{GL_R32F(33326): GL_FLOAT(5126),
 GL_RG32F(33328): GL_FLOAT(5126),
 GL_R8I(33329): GL_BYTE(5120),
 GL_R8UI(33330): GL_UNSIGNED_BYTE(5121),
 GL_R16I(33331): GL_SHORT(5122),
 GL_R16UI(33332): GL_UNSIGNED_SHORT(5123),
 GL_R32I(33333): GL_INT(5124),
 GL_R32UI(33334): GL_UNSIGNED_INT(5125),
...

texture_compare_funcs

Value:
Enum(NEVER, LESS, EQUAL, LEQUAL, GREATER, NOTEQUAL, GEQUAL, ALWAYS)

texture_min_filters

Value:
Enum(NEAREST, LINEAR, NEAREST_MIPMAP_LINEAR, LINEAR_MIPMAP_LINEAR, LIN\
EAR_MIPMAP_NEAREST, NEAREST_MIPMAP_NEAREST)

texture_wrapmodes

Value:
Enum(MIRRORED_REPEAT, REPEAT, CLAMP_TO_BORDER, CLAMP_TO_EDGE)

primitive_types

Value:
Enum(POINTS, LINES, LINE_LOOP, LINE_STRIP, TRIANGLES, TRIANGLE_STRIP, \
TRIANGLE_FAN, LINES_ADJACENCY, LINE_STRIP_ADJACENCY, TRIANGLES_ADJACEN\
CY, TRIANGLE_STRIP_ADJACENCY, PATCHES)

buffer_usages

Value:
Enum(STREAM_DRAW, STREAM_READ, STREAM_COPY, STATIC_DRAW, STATIC_READ, \
STATIC_COPY, DYNAMIC_DRAW, DYNAMIC_READ, DYNAMIC_COPY)

buffer_dimensions_to_primitive

Value:
{1: POINTS, 2: LINES, 3: TRIANGLES}

primitive_to_buffer_dimensions

Value:
{LINES: 2, POINTS: 1, TRIANGLES: 3}

blend_functions

Value:
Enum(SRC_COLOR, ONE_MINUS_SRC_COLOR, ONE_MINUS_CONSTANT_COLOR, ONE_MIN\
US_SRC_ALPHA, ONE_MINUS_CONSTANT_ALPHA, ONE_MINUS_DST_ALPHA, DST_COLOR\
, CONSTANT_COLOR, SRC_ALPHA_SATURATE, ONE_MINUS_DST_COLOR, SRC_ALPHA, \
CONSTANT_ALPHA, ONE, DST_ALPHA, ZERO)

depth_functions

Value:
Enum(NEVER, LESS, EQUAL, LEQUAL, GREATER, NOTEQUAL, GEQUAL, ALWAYS)

draw_buffers

Value:
Enum(NONE, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, FRONT, BACK, LEFT, RIGH\
T, FRONT_AND_BACK, FRONT_LEFT, COLOR_ATTACHMENT0, COLOR_ATTACHMENT1, C\
OLOR_ATTACHMENT2, COLOR_ATTACHMENT3, COLOR_ATTACHMENT4, COLOR_ATTACHME\
NT5, COLOR_ATTACHMENT6, COLOR_ATTACHMENT7, COLOR_ATTACHMENT8, COLOR_AT\
TACHMENT9, COLOR_ATTACHMENT10, COLOR_ATTACHMENT11, COLOR_ATTACHMENT12,\
 COLOR_ATTACHMENT13, COLOR_ATTACHMENT14, COLOR_ATTACHMENT15)

logic_op_modes

Value:
Enum(CLEAR, AND, AND_REVERSE, COPY, AND_INVERTED, NOOP, XOR, OR, NOR, \
EQUIV, INVERT, OR_REVERSE, COPY_INVERTED, OR_INVERTED, NAND, SET)

provoke_modes

Value:
Enum(FIRST_VERTEX_CONVENTION, LAST_VERTEX_CONVENTION)

color_read_formats

Value:
Enum(BGR, STENCIL_INDEX, DEPTH_COMPONENT, RED, GREEN, BLUE, RGB, RGBA,\
 BGRA, DEPTH_STENCIL)

color_read_types

Value:
Enum(BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT, INT, UNSIGNED_INT, FL\
OAT, HALF_FLOAT, FLOAT_32_UNSIGNED_INT_24_8_REV, UNSIGNED_BYTE_3_3_2, \
UNSIGNED_SHORT_4_4_4_4, UNSIGNED_SHORT_5_5_5_1, UNSIGNED_INT_8_8_8_8, \
UNSIGNED_INT_10_10_10_2, UNSIGNED_INT_10F_11F_11F_REV, UNSIGNED_INT_5_\
9_9_9_REV, UNSIGNED_BYTE_2_3_3_REV, UNSIGNED_SHORT_5_6_5, UNSIGNED_SHO\
RT_5_6_5_REV, UNSIGNED_SHORT_4_4_4_4_REV, UNSIGNED_SHORT_1_5_5_5_REV, \
UNSIGNED_INT_8_8_8_8_REV, UNSIGNED_INT_2_10_10_10_REV, UNSIGNED_INT_24\
_8)

read_buffers

Value:
Enum(NONE, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, FRONT, BACK, LEFT, RIGH\
T, FRONT_LEFT, COLOR_ATTACHMENT0, COLOR_ATTACHMENT1, COLOR_ATTACHMENT2\
, COLOR_ATTACHMENT3, COLOR_ATTACHMENT4, COLOR_ATTACHMENT5, COLOR_ATTAC\
HMENT6, COLOR_ATTACHMENT7, COLOR_ATTACHMENT8, COLOR_ATTACHMENT9, COLOR\
_ATTACHMENT10, COLOR_ATTACHMENT11, COLOR_ATTACHMENT12, COLOR_ATTACHMEN\
T13, COLOR_ATTACHMENT14, COLOR_ATTACHMENT15)

transform_feedback_buffer_modes

Value:
Enum(INTERLEAVED_ATTRIBS, SEPARATE_ATTRIBS)

client_wait_sync_returns

Value:
Enum(ALREADY_SIGNALED, TIMEOUT_EXPIRED, CONDITION_SATISFIED, WAIT_FAIL\
ED)

framebuffer_status

Value:
Enum(INCOMPLETE_MULTISAMPLE, INCOMPLETE_LAYER_TARGETS, COMPLETE, INCOM\
PLETE_ATTACHMENT, INCOMPLETE_MISSING_ATTACHMENT, UNDEFINED, INCOMPLETE\
_DRAW_BUFFER, INCOMPLETE_READ_BUFFER, UNSUPPORTED)