Functions
device
device() -> int<collection.CRATE_SHADER>
int<collection.CRATE_SHADER>
release
release(device)
After a device is released, it and any associated buffers and kernels cannot be used.
- id
int<collection.CRATE_SHADER>
add_program
add_program(device, program)
- id
int<collection.CRATE_SHADER>
- program
string
add_program_file
add_program_file(device, path)
- device
int<collection.CRATE_SHADER>
- path
string
kernel
kernel(device, name, []globals, []locals) -> int<shader.KERNEL>
- device
int<collection.CRATE_SHADER>
- name
string
- globals
[]int
- List of the global work sizes to use. - locals
[]int
- List of the local work sizes to use.
int<shader.KERNEL>
run
run(device, kernel, buffers...)
- device
int<collection.CRATE_SHADER>
- kernel
int<shader.KERNEL>
- buffers
struct<shader.Buffer>...
buffer_image
buffer_image(device, type, width, height) -> struct<shader.BufferImage>
- device
int<collection.CRATE_SHADER>
- type
int<shader.ImageType>
- width
int
- height
int
struct<shader.BufferImage>
buffer_image_ext
buffer_image_ext(device, type, p1, p2) -> struct<shader.BufferImage>
- device
int<collection.CRATE_SHADER>
- type
int<shader.ImageType>
- p1
struct<image.Point>
- p2
struct<image.Point>
struct<shader.BufferImage>
buffer_image_ext_xy
buffer_image_ext_xy(device, type, x1, y1, x2, y2) -> struct<shader.BufferImage>
- device
int<collection.CRATE_SHADER>
- type
int<shader.ImageType>
- x1
int
- y1
int
- x2
int
- y2
int
struct<shader.BufferImage>
buffer_image_from
buffer_image_from(device, id) -> struct<shader.BufferImage>
@blocking
- device
int<collection.CRATE_SHADER>
- id
int<collection.IMAGE>
struct<shader.BufferImage>
buffer_vector
buffer_vector(device, length) -> struct<shader.BufferVector>
- device
int<collection.CRATE_SHADER>
- length
int
struct<shader.BufferVector>
buffer_bytes
buffer_bytes(device, size) -> struct<shader.BufferBytes>
- device
int<collection.CRATE_SHADER>
- size
int
struct<shader.BufferBytes>
Constants
BufferType
BUFFER_IMAGE
BUFFER_VECTOR
BUFFER_BYTES
ImageType
IMAGE_RGBA
IMAGE_GRAY
ID
KERNEL
Structs
BufferImage
- type
int<shader.BufferType>
- device
int<collection.CRATE_SHADER>
- id
int
bounds
bounds() -> int, int
copy
copy(self, int<collection.IMAGE>) -> self
data
data(name string, int<image.Encoding>) -> int<collection.IMAGE>
data_into
data_into(self, int<collection.IMAGE>) -> self
BufferVector
- type
int<shader.BufferType>
- device
int<collection.CRATE_SHADER>
- id
int
copy
copy(self, []float) -> self
data
data() -> []float
length
length() -> int
BufferBytes
- type
int<shader.BufferType>
- device
int<collection.CRATE_SHADER>
- id
int
copy
copy(self, []int) -> self
data
data() -> []int
size
size() -> int
Interfaces
Buffer
- type
int<shader.BufferType>
- device
int<collection.CRATE_SHADER>
- id
int