sokol.shape

Machine generated D bindings for Sokol library.

Source header: sokol_shape.h Module: sokol.shape

Do not edit manually; regenerate using gen_d.py.

Members

Functions

boxSizes
Sizes boxSizes(uint tiles, size_t vertex_size)
Undocumented in source. Be warned that the author may not have intended to support it.
buildBox
void buildBox(State state, Box params)
Undocumented in source. Be warned that the author may not have intended to support it.
buildCylinder
void buildCylinder(State state, Cylinder params)
Undocumented in source. Be warned that the author may not have intended to support it.
buildPlane
void buildPlane(State state, Plane params)
Undocumented in source. Be warned that the author may not have intended to support it.
buildSphere
void buildSphere(State state, Sphere params)
Undocumented in source. Be warned that the author may not have intended to support it.
buildTorus
void buildTorus(State state, Torus params)
Undocumented in source. Be warned that the author may not have intended to support it.
color3b
uint color3b(ubyte r, ubyte g, ubyte b)
Undocumented in source. Be warned that the author may not have intended to support it.
color3f
uint color3f(float r, float g, float b)
Undocumented in source. Be warned that the author may not have intended to support it.
color4b
uint color4b(ubyte r, ubyte g, ubyte b, ubyte a)
Undocumented in source. Be warned that the author may not have intended to support it.
color4f
uint color4f(float r, float g, float b, float a)
Undocumented in source. Be warned that the author may not have intended to support it.
colorVertexAttrState
sg.VertexAttrState colorVertexAttrState(State state)
Undocumented in source. Be warned that the author may not have intended to support it.
cylinderSizes
Sizes cylinderSizes(uint slices, uint stacks, size_t vertex_size)
Undocumented in source. Be warned that the author may not have intended to support it.
elementRange
ElementRange elementRange(State state)
Undocumented in source. Be warned that the author may not have intended to support it.
indexBufferDesc
sg.BufferDesc indexBufferDesc(State state)
Undocumented in source. Be warned that the author may not have intended to support it.
mat4
Mat4 mat4(float* m)
Undocumented in source. Be warned that the author may not have intended to support it.
mat4Transpose
Mat4 mat4Transpose(float* m)
Undocumented in source. Be warned that the author may not have intended to support it.
normalVertexAttrState
sg.VertexAttrState normalVertexAttrState(State state)
Undocumented in source. Be warned that the author may not have intended to support it.
planeSizes
Sizes planeSizes(uint tiles, size_t vertex_size)
Undocumented in source. Be warned that the author may not have intended to support it.
positionVertexAttrState
sg.VertexAttrState positionVertexAttrState(State state)
Undocumented in source. Be warned that the author may not have intended to support it.
sphereSizes
Sizes sphereSizes(uint slices, uint stacks, size_t vertex_size)
Undocumented in source. Be warned that the author may not have intended to support it.
sshape_box_sizes
Sizes sshape_box_sizes(uint tiles, size_t vertex_size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_build_box
void sshape_build_box(State* state, Box* params)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_build_cylinder
void sshape_build_cylinder(State* state, Cylinder* params)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_build_plane
void sshape_build_plane(State* state, Plane* params)

shape builder functions

sshape_build_sphere
void sshape_build_sphere(State* state, Sphere* params)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_build_torus
void sshape_build_torus(State* state, Torus* params)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_color_3b
uint sshape_color_3b(ubyte r, ubyte g, ubyte b)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_color_3f
uint sshape_color_3f(float r, float g, float b)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_color_4b
uint sshape_color_4b(ubyte r, ubyte g, ubyte b, ubyte a)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_color_4f
uint sshape_color_4f(float r, float g, float b, float a)

helper functions to build packed color value from floats or bytes

sshape_color_vertex_attr_state
sg.VertexAttrState sshape_color_vertex_attr_state(State* state)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_cylinder_sizes
Sizes sshape_cylinder_sizes(uint slices, uint stacks, size_t vertex_size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_element_range
ElementRange sshape_element_range(State* state)

extract sokol-gfx desc structs and primitive ranges from build state

sshape_index_buffer_desc
sg.BufferDesc sshape_index_buffer_desc(State* state)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_mat4
Mat4 sshape_mat4(float* m)

adapter function for filling matrix struct from generic float[16] array

sshape_mat4_transpose
Mat4 sshape_mat4_transpose(float* m)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_normal_vertex_attr_state
sg.VertexAttrState sshape_normal_vertex_attr_state(State* state)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_plane_sizes
Sizes sshape_plane_sizes(uint tiles, size_t vertex_size)

query required vertex- and index-buffer sizes in bytes

sshape_position_vertex_attr_state
sg.VertexAttrState sshape_position_vertex_attr_state(State* state)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_sphere_sizes
Sizes sshape_sphere_sizes(uint slices, uint stacks, size_t vertex_size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_texcoord_vertex_attr_state
sg.VertexAttrState sshape_texcoord_vertex_attr_state(State* state)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_torus_sizes
Sizes sshape_torus_sizes(uint sides, uint rings, size_t vertex_size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_vertex_buffer_desc
sg.BufferDesc sshape_vertex_buffer_desc(State* state)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_vertex_buffer_layout_state
sg.VertexBufferLayoutState sshape_vertex_buffer_layout_state(State* state)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sshape_vertex_size
size_t sshape_vertex_size(OptionalComponents* components)

compute size of vertex given optional components

texcoordVertexAttrState
sg.VertexAttrState texcoordVertexAttrState(State state)
Undocumented in source. Be warned that the author may not have intended to support it.
torusSizes
Sizes torusSizes(uint sides, uint rings, size_t vertex_size)
Undocumented in source. Be warned that the author may not have intended to support it.
vertexBufferDesc
sg.BufferDesc vertexBufferDesc(State state)
Undocumented in source. Be warned that the author may not have intended to support it.
vertexBufferLayoutState
sg.VertexBufferLayoutState vertexBufferLayoutState(State state)
Undocumented in source. Be warned that the author may not have intended to support it.
vertexSize
size_t vertexSize(OptionalComponents components)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

max_vertex_size
enum max_vertex_size;
Undocumented in source.
min_vertex_size
enum min_vertex_size;
Undocumented in source.

Structs

Box
struct Box
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
BufferState
struct BufferState

in/out struct to keep track of mesh-build state

Cylinder
struct Cylinder
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
ElementRange
struct ElementRange

a range of draw-elements (sg_draw(int base_element, int num_element, ...))

Mat4
struct Mat4

a 4x4 matrix wrapper struct

OptionalComponents
struct OptionalComponents

a struct for configuring optional vertex components

Plane
struct Plane

creation parameters for the different shape types

Range
struct Range

sshape_range_t is a pointer-size-pair struct used to pass memory blobs into sokol-shape. When initialized from a value type (array or struct), use the SSHAPE_RANGE() macro to build an sshape_range struct.

Sizes
struct Sizes
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SizesItem
struct SizesItem

number of elements and byte size of build actions

Sphere
struct Sphere
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
State
struct State
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Torus
struct Torus
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta