pygfx.utils.enums.ElementFormat
- class pygfx.utils.enums.ElementFormat
Bases:
Enum
The base elements to specify formats.
These values can be used to compose formats of various layouts, e.g. 2D positions with “2xf4”, rgb colors with “3xu8” or matrices with “4x4xf32”. The purpose is to provide a common representation for simple formats, that can be used for buffers, textures and uniform buffers.
- i1 = 'i1'
A signed 8bit integer.
- u1 = 'u1'
An unsigned 8-bit integer (byte).
- i2 = 'i2'
A signed 16-bit integer.
- u2 = 'u2'
An unsigned 16-bit integer.
- i4 = 'i4'
A signed 32-bit integer.
- u4 = 'u4'
An unsigned 32-bit integer.
- f2 = 'f2'
A 16-bit float.
- f4 = 'f4'
A 32-bit float.