Source code

Revision control

Copy as Markdown

Other Tools

/* automatically generated by rust-bindgen */
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct glslopt_shader {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct glslopt_ctx {
_unused: [u8; 0],
}
pub const glslopt_shader_type_kGlslOptShaderVertex: glslopt_shader_type = 0;
pub const glslopt_shader_type_kGlslOptShaderFragment: glslopt_shader_type = 1;
pub type glslopt_shader_type = u32;
pub const glslopt_options_kGlslOptionSkipPreprocessor: glslopt_options = 1;
pub const glslopt_options_kGlslOptionNotFullShader: glslopt_options = 2;
pub type glslopt_options = u32;
pub const glslopt_target_kGlslTargetOpenGL: glslopt_target = 0;
pub const glslopt_target_kGlslTargetOpenGLES20: glslopt_target = 1;
pub const glslopt_target_kGlslTargetOpenGLES30: glslopt_target = 2;
pub const glslopt_target_kGlslTargetMetal: glslopt_target = 3;
pub type glslopt_target = u32;
pub const glslopt_basic_type_kGlslTypeFloat: glslopt_basic_type = 0;
pub const glslopt_basic_type_kGlslTypeInt: glslopt_basic_type = 1;
pub const glslopt_basic_type_kGlslTypeBool: glslopt_basic_type = 2;
pub const glslopt_basic_type_kGlslTypeTex2D: glslopt_basic_type = 3;
pub const glslopt_basic_type_kGlslTypeTex3D: glslopt_basic_type = 4;
pub const glslopt_basic_type_kGlslTypeTexCube: glslopt_basic_type = 5;
pub const glslopt_basic_type_kGlslTypeTex2DShadow: glslopt_basic_type = 6;
pub const glslopt_basic_type_kGlslTypeTex2DArray: glslopt_basic_type = 7;
pub const glslopt_basic_type_kGlslTypeOther: glslopt_basic_type = 8;
pub const glslopt_basic_type_kGlslTypeCount: glslopt_basic_type = 9;
pub type glslopt_basic_type = u32;
pub const glslopt_precision_kGlslPrecHigh: glslopt_precision = 0;
pub const glslopt_precision_kGlslPrecMedium: glslopt_precision = 1;
pub const glslopt_precision_kGlslPrecLow: glslopt_precision = 2;
pub const glslopt_precision_kGlslPrecCount: glslopt_precision = 3;
pub type glslopt_precision = u32;
extern "C" {
pub fn glslopt_initialize(target: glslopt_target) -> *mut glslopt_ctx;
}
extern "C" {
pub fn glslopt_cleanup(ctx: *mut glslopt_ctx);
}
extern "C" {
pub fn glslopt_set_max_unroll_iterations(
ctx: *mut glslopt_ctx,
iterations: ::std::os::raw::c_uint,
);
}
extern "C" {
pub fn glslopt_optimize(
ctx: *mut glslopt_ctx,
type_: glslopt_shader_type,
shaderSource: *const ::std::os::raw::c_char,
options: ::std::os::raw::c_uint,
) -> *mut glslopt_shader;
}
extern "C" {
pub fn glslopt_get_status(shader: *mut glslopt_shader) -> bool;
}
extern "C" {
pub fn glslopt_get_output(shader: *mut glslopt_shader) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn glslopt_get_raw_output(shader: *mut glslopt_shader) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn glslopt_get_log(shader: *mut glslopt_shader) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn glslopt_shader_delete(shader: *mut glslopt_shader);
}
extern "C" {
pub fn glslopt_shader_get_input_count(shader: *mut glslopt_shader) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn glslopt_shader_get_input_desc(
shader: *mut glslopt_shader,
index: ::std::os::raw::c_int,
outName: *mut *const ::std::os::raw::c_char,
outType: *mut glslopt_basic_type,
outPrec: *mut glslopt_precision,
outVecSize: *mut ::std::os::raw::c_int,
outMatSize: *mut ::std::os::raw::c_int,
outArraySize: *mut ::std::os::raw::c_int,
outLocation: *mut ::std::os::raw::c_int,
);
}
extern "C" {
pub fn glslopt_shader_get_uniform_count(shader: *mut glslopt_shader) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn glslopt_shader_get_uniform_total_size(
shader: *mut glslopt_shader,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn glslopt_shader_get_uniform_desc(
shader: *mut glslopt_shader,
index: ::std::os::raw::c_int,
outName: *mut *const ::std::os::raw::c_char,
outType: *mut glslopt_basic_type,
outPrec: *mut glslopt_precision,
outVecSize: *mut ::std::os::raw::c_int,
outMatSize: *mut ::std::os::raw::c_int,
outArraySize: *mut ::std::os::raw::c_int,
outLocation: *mut ::std::os::raw::c_int,
);
}
extern "C" {
pub fn glslopt_shader_get_texture_count(shader: *mut glslopt_shader) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn glslopt_shader_get_texture_desc(
shader: *mut glslopt_shader,
index: ::std::os::raw::c_int,
outName: *mut *const ::std::os::raw::c_char,
outType: *mut glslopt_basic_type,
outPrec: *mut glslopt_precision,
outVecSize: *mut ::std::os::raw::c_int,
outMatSize: *mut ::std::os::raw::c_int,
outArraySize: *mut ::std::os::raw::c_int,
outLocation: *mut ::std::os::raw::c_int,
);
}
extern "C" {
pub fn glslopt_shader_get_stats(
shader: *mut glslopt_shader,
approxMath: *mut ::std::os::raw::c_int,
approxTex: *mut ::std::os::raw::c_int,
approxFlow: *mut ::std::os::raw::c_int,
);
}