2020-01-16 22:45:47 +03:00
|
|
|
module sgl
|
|
|
|
|
2022-01-03 16:05:24 +03:00
|
|
|
import sokol.gfx
|
|
|
|
|
|
|
|
[typedef]
|
|
|
|
struct C.sgl_pipeline {
|
|
|
|
id u32
|
2020-01-16 22:45:47 +03:00
|
|
|
}
|
|
|
|
|
2022-01-03 16:05:24 +03:00
|
|
|
pub type Pipeline = C.sgl_pipeline
|
|
|
|
|
|
|
|
[typedef]
|
|
|
|
struct C.sgl_context {
|
2020-01-16 22:45:47 +03:00
|
|
|
id u32
|
|
|
|
}
|
|
|
|
|
2022-01-03 16:05:24 +03:00
|
|
|
pub type Context = C.sgl_context
|
|
|
|
|
|
|
|
// ContextDesc
|
|
|
|
//
|
|
|
|
// Describes the initialization parameters of a rendering context.
|
|
|
|
// Creating additional contexts is useful if you want to render
|
|
|
|
// in separate sokol-gfx passes.
|
|
|
|
// ContextDesc is sgl_context_desc_t
|
|
|
|
pub type ContextDesc = C.sgl_context_desc_t
|
|
|
|
|
|
|
|
[typedef]
|
|
|
|
struct C.sgl_context_desc_t {
|
|
|
|
max_vertices int // default: 64k
|
|
|
|
max_commands int // default: 16k
|
|
|
|
color_format gfx.PixelFormat // C.sg_pixel_format
|
|
|
|
depth_format gfx.PixelFormat // C.sg_pixel_format
|
|
|
|
sample_count int
|
|
|
|
}
|
|
|
|
|
|
|
|
pub type Desc = C.sgl_desc_t
|
|
|
|
|
|
|
|
[typedef]
|
|
|
|
struct C.sgl_desc_t {
|
2021-05-08 13:32:29 +03:00
|
|
|
max_vertices int // size for vertex buffer
|
|
|
|
max_commands int // size of uniform- and command-buffers
|
2022-08-11 20:49:11 +03:00
|
|
|
context_pool_size int // max number of contexts (including default context), default: 4
|
|
|
|
pipeline_pool_size int // size of internal pipeline pool, default: 64
|
2022-01-03 16:05:24 +03:00
|
|
|
color_format gfx.PixelFormat // C.sg_pixel_format
|
|
|
|
depth_format gfx.PixelFormat // C.sg_pixel_format
|
2021-05-08 13:32:29 +03:00
|
|
|
sample_count int
|
2022-01-03 16:05:24 +03:00
|
|
|
face_winding gfx.FaceWinding // C.sg_face_winding // default front face winding is CCW
|
2020-01-22 23:34:38 +03:00
|
|
|
}
|