Flags
These flags are defined in wgpu.flags
, but are also available from the root wgpu namespace.
Flags are bitmasks; zero or multiple fields can be set at the same time.
Flags are integer bitmasks, but can also be passed as strings, so instead of
wgpu.BufferUsage.MAP_READ | wgpu.BufferUsage.COPY_DST
,
one can also write "MAP_READ|COPY_DIST"
.
-
class wgpu.flags.BufferUsage
-
COPY_DST = 8
-
COPY_SRC = 4
-
INDEX = 16
-
INDIRECT = 256
-
MAP_READ = 1
-
MAP_WRITE = 2
-
QUERY_RESOLVE = 512
-
STORAGE = 128
-
UNIFORM = 64
-
VERTEX = 32
-
class wgpu.flags.ColorWrite
-
ALL = 15
-
ALPHA = 8
-
BLUE = 4
-
GREEN = 2
-
RED = 1
-
class wgpu.flags.MapMode
-
READ = 1
-
WRITE = 2
-
class wgpu.flags.ShaderStage
-
COMPUTE = 4
-
FRAGMENT = 2
-
VERTEX = 1
-
class wgpu.flags.TextureUsage
-
COPY_DST = 2
-
COPY_SRC = 1
-
RENDER_ATTACHMENT = 16
-
STORAGE_BINDING = 8
-
TEXTURE_BINDING = 4