sokol.shape

Undocumented in source.

Members

Functions

boxSizes
Sizes boxSizes(uint tiles)
Undocumented in source. Be warned that the author may not have intended to support it.
buildBox
Buffer buildBox(Buffer buf, Box params)
Undocumented in source. Be warned that the author may not have intended to support it.
buildCylinder
Buffer buildCylinder(Buffer buf, Cylinder params)
Undocumented in source. Be warned that the author may not have intended to support it.
buildPlane
Buffer buildPlane(Buffer buf, Plane params)

shape builder functions

buildSphere
Buffer buildSphere(Buffer buf, Sphere params)
Undocumented in source. Be warned that the author may not have intended to support it.
buildTorus
Buffer buildTorus(Buffer buf, 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)

helper functions to build packed color value from floats or bytes

colorVertexAttrState
sg.VertexAttrState colorVertexAttrState()
Undocumented in source. Be warned that the author may not have intended to support it.
cylinderSizes
Sizes cylinderSizes(uint slices, uint stacks)
Undocumented in source. Be warned that the author may not have intended to support it.
elementRange
ElementRange elementRange(Buffer buf)

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

indexBufferDesc
sg.BufferDesc indexBufferDesc(Buffer buf)
Undocumented in source. Be warned that the author may not have intended to support it.
mat4
Mat4 mat4(float* m)

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

mat4Transpose
Mat4 mat4Transpose(float* m)
Undocumented in source. Be warned that the author may not have intended to support it.
normalVertexAttrState
sg.VertexAttrState normalVertexAttrState()
Undocumented in source. Be warned that the author may not have intended to support it.
planeSizes
Sizes planeSizes(uint tiles)

query required vertex- and index-buffer sizes in bytes

positionVertexAttrState
sg.VertexAttrState positionVertexAttrState()
Undocumented in source. Be warned that the author may not have intended to support it.
sphereSizes
Sizes sphereSizes(uint slices, uint stacks)
Undocumented in source. Be warned that the author may not have intended to support it.
sshape_box_sizes
Sizes sshape_box_sizes(uint )
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
Buffer sshape_build_box(Buffer* , Box* )
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
Buffer sshape_build_cylinder(Buffer* , Cylinder* )
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
Buffer sshape_build_plane(Buffer* , Plane* )

shape builder functions

sshape_build_sphere
Buffer sshape_build_sphere(Buffer* , Sphere* )
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
Buffer sshape_build_torus(Buffer* , Torus* )
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 , ubyte , ubyte )
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 , float , float )
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 , ubyte , ubyte , ubyte )
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 , float , float , float )

helper functions to build packed color value from floats or bytes

sshape_color_vertex_attr_state
sg.VertexAttrState sshape_color_vertex_attr_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 , uint )
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(Buffer* )

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

sshape_index_buffer_desc
sg.BufferDesc sshape_index_buffer_desc(Buffer* )
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* )

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

sshape_mat4_transpose
Mat4 sshape_mat4_transpose(float* )
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()
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 )

query required vertex- and index-buffer sizes in bytes

sshape_position_vertex_attr_state
sg.VertexAttrState sshape_position_vertex_attr_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 , uint )
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()
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 , uint )
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(Buffer* )
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()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
texcoordVertexAttrState
sg.VertexAttrState texcoordVertexAttrState()
Undocumented in source. Be warned that the author may not have intended to support it.
torusSizes
Sizes torusSizes(uint sides, uint rings)
Undocumented in source. Be warned that the author may not have intended to support it.
vertexBufferDesc
sg.BufferDesc vertexBufferDesc(Buffer buf)
Undocumented in source. Be warned that the author may not have intended to support it.
vertexBufferLayoutState
sg.VertexBufferLayoutState vertexBufferLayoutState()
Undocumented in source. Be warned that the author may not have intended to support it.

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.
Buffer
struct Buffer
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
BufferItem
struct BufferItem

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

Plane
struct Plane

creation parameters for the different shape types

Range
struct Range

sshape_range 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.
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.
Vertex
struct Vertex

vertex layout of the generated geometry

Meta