2020-01-16 20:45:47 +01:00
|
|
|
module sgl
|
|
|
|
|
2022-01-03 14:05:24 +01:00
|
|
|
import sokol.gfx
|
|
|
|
|
|
|
|
[typedef]
|
|
|
|
struct C.sgl_pipeline {
|
|
|
|
id u32
|
2020-01-16 20:45:47 +01:00
|
|
|
}
|
|
|
|
|
2022-01-03 14:05:24 +01:00
|
|
|
pub type Pipeline = C.sgl_pipeline
|
|
|
|
|
|
|
|
[typedef]
|
|
|
|
struct C.sgl_context {
|
2020-01-16 20:45:47 +01:00
|
|
|
id u32
|
|
|
|
}
|
|
|
|
|
2022-01-03 14:05:24 +01: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 12:32:29 +02:00
|
|
|
max_vertices int // size for vertex buffer
|
|
|
|
max_commands int // size of uniform- and command-buffers
|
|
|
|
pipeline_pool_size int // size of the internal pipeline pool, default is 64
|
2022-01-03 14:05:24 +01:00
|
|
|
color_format gfx.PixelFormat // C.sg_pixel_format
|
|
|
|
depth_format gfx.PixelFormat // C.sg_pixel_format
|
2021-05-08 12:32:29 +02:00
|
|
|
sample_count int
|
2022-01-03 14:05:24 +01:00
|
|
|
face_winding gfx.FaceWinding // C.sg_face_winding // default front face winding is CCW
|
2020-01-22 21:34:38 +01:00
|
|
|
}
|