| 1 |
/* automatically generated by rust-bindgen */ |
| 2 |
|
| 3 |
#[repr(C)] |
| 4 |
#[derive(Debug, Copy, Clone)] |
| 5 |
pub struct glslopt_shader { |
| 6 |
_unused: [u8; 0], |
| 7 |
} |
| 8 |
#[repr(C)] |
| 9 |
#[derive(Debug, Copy, Clone)] |
| 10 |
pub struct glslopt_ctx { |
| 11 |
_unused: [u8; 0], |
| 12 |
} |
| 13 |
pub const glslopt_shader_type_kGlslOptShaderVertex: glslopt_shader_type = 0; |
| 14 |
pub const glslopt_shader_type_kGlslOptShaderFragment: glslopt_shader_type = 1; |
| 15 |
pub type glslopt_shader_type = u32; |
| 16 |
pub const glslopt_options_kGlslOptionSkipPreprocessor: glslopt_options = 1; |
| 17 |
pub const glslopt_options_kGlslOptionNotFullShader: glslopt_options = 2; |
| 18 |
pub type glslopt_options = u32; |
| 19 |
pub const glslopt_target_kGlslTargetOpenGL: glslopt_target = 0; |
| 20 |
pub const glslopt_target_kGlslTargetOpenGLES20: glslopt_target = 1; |
| 21 |
pub const glslopt_target_kGlslTargetOpenGLES30: glslopt_target = 2; |
| 22 |
pub const glslopt_target_kGlslTargetMetal: glslopt_target = 3; |
| 23 |
pub type glslopt_target = u32; |
| 24 |
pub const glslopt_basic_type_kGlslTypeFloat: glslopt_basic_type = 0; |
| 25 |
pub const glslopt_basic_type_kGlslTypeInt: glslopt_basic_type = 1; |
| 26 |
pub const glslopt_basic_type_kGlslTypeBool: glslopt_basic_type = 2; |
| 27 |
pub const glslopt_basic_type_kGlslTypeTex2D: glslopt_basic_type = 3; |
| 28 |
pub const glslopt_basic_type_kGlslTypeTex3D: glslopt_basic_type = 4; |
| 29 |
pub const glslopt_basic_type_kGlslTypeTexCube: glslopt_basic_type = 5; |
| 30 |
pub const glslopt_basic_type_kGlslTypeTex2DShadow: glslopt_basic_type = 6; |
| 31 |
pub const glslopt_basic_type_kGlslTypeTex2DArray: glslopt_basic_type = 7; |
| 32 |
pub const glslopt_basic_type_kGlslTypeOther: glslopt_basic_type = 8; |
| 33 |
pub const glslopt_basic_type_kGlslTypeCount: glslopt_basic_type = 9; |
| 34 |
pub type glslopt_basic_type = u32; |
| 35 |
pub const glslopt_precision_kGlslPrecHigh: glslopt_precision = 0; |
| 36 |
pub const glslopt_precision_kGlslPrecMedium: glslopt_precision = 1; |
| 37 |
pub const glslopt_precision_kGlslPrecLow: glslopt_precision = 2; |
| 38 |
pub const glslopt_precision_kGlslPrecCount: glslopt_precision = 3; |
| 39 |
pub type glslopt_precision = u32; |
| 40 |
extern "C" { |
| 41 |
pub fn glslopt_initialize(target: glslopt_target) -> *mut glslopt_ctx; |
| 42 |
} |
| 43 |
extern "C" { |
| 44 |
pub fn glslopt_cleanup(ctx: *mut glslopt_ctx); |
| 45 |
} |
| 46 |
extern "C" { |
| 47 |
pub fn glslopt_set_max_unroll_iterations( |
| 48 |
ctx: *mut glslopt_ctx, |
| 49 |
iterations: ::std::os::raw::c_uint, |
| 50 |
); |
| 51 |
} |
| 52 |
extern "C" { |
| 53 |
pub fn glslopt_optimize( |
| 54 |
ctx: *mut glslopt_ctx, |
| 55 |
type_: glslopt_shader_type, |
| 56 |
shaderSource: *const ::std::os::raw::c_char, |
| 57 |
options: ::std::os::raw::c_uint, |
| 58 |
) -> *mut glslopt_shader; |
| 59 |
} |
| 60 |
extern "C" { |
| 61 |
pub fn glslopt_get_status(shader: *mut glslopt_shader) -> bool; |
| 62 |
} |
| 63 |
extern "C" { |
| 64 |
pub fn glslopt_get_output(shader: *mut glslopt_shader) -> *const ::std::os::raw::c_char; |
| 65 |
} |
| 66 |
extern "C" { |
| 67 |
pub fn glslopt_get_raw_output(shader: *mut glslopt_shader) -> *const ::std::os::raw::c_char; |
| 68 |
} |
| 69 |
extern "C" { |
| 70 |
pub fn glslopt_get_log(shader: *mut glslopt_shader) -> *const ::std::os::raw::c_char; |
| 71 |
} |
| 72 |
extern "C" { |
| 73 |
pub fn glslopt_shader_delete(shader: *mut glslopt_shader); |
| 74 |
} |
| 75 |
extern "C" { |
| 76 |
pub fn glslopt_shader_get_input_count(shader: *mut glslopt_shader) -> ::std::os::raw::c_int; |
| 77 |
} |
| 78 |
extern "C" { |
| 79 |
pub fn glslopt_shader_get_input_desc( |
| 80 |
shader: *mut glslopt_shader, |
| 81 |
index: ::std::os::raw::c_int, |
| 82 |
outName: *mut *const ::std::os::raw::c_char, |
| 83 |
outType: *mut glslopt_basic_type, |
| 84 |
outPrec: *mut glslopt_precision, |
| 85 |
outVecSize: *mut ::std::os::raw::c_int, |
| 86 |
outMatSize: *mut ::std::os::raw::c_int, |
| 87 |
outArraySize: *mut ::std::os::raw::c_int, |
| 88 |
outLocation: *mut ::std::os::raw::c_int, |
| 89 |
); |
| 90 |
} |
| 91 |
extern "C" { |
| 92 |
pub fn glslopt_shader_get_uniform_count(shader: *mut glslopt_shader) -> ::std::os::raw::c_int; |
| 93 |
} |
| 94 |
extern "C" { |
| 95 |
pub fn glslopt_shader_get_uniform_total_size( |
| 96 |
shader: *mut glslopt_shader, |
| 97 |
) -> ::std::os::raw::c_int; |
| 98 |
} |
| 99 |
extern "C" { |
| 100 |
pub fn glslopt_shader_get_uniform_desc( |
| 101 |
shader: *mut glslopt_shader, |
| 102 |
index: ::std::os::raw::c_int, |
| 103 |
outName: *mut *const ::std::os::raw::c_char, |
| 104 |
outType: *mut glslopt_basic_type, |
| 105 |
outPrec: *mut glslopt_precision, |
| 106 |
outVecSize: *mut ::std::os::raw::c_int, |
| 107 |
outMatSize: *mut ::std::os::raw::c_int, |
| 108 |
outArraySize: *mut ::std::os::raw::c_int, |
| 109 |
outLocation: *mut ::std::os::raw::c_int, |
| 110 |
); |
| 111 |
} |
| 112 |
extern "C" { |
| 113 |
pub fn glslopt_shader_get_texture_count(shader: *mut glslopt_shader) -> ::std::os::raw::c_int; |
| 114 |
} |
| 115 |
extern "C" { |
| 116 |
pub fn glslopt_shader_get_texture_desc( |
| 117 |
shader: *mut glslopt_shader, |
| 118 |
index: ::std::os::raw::c_int, |
| 119 |
outName: *mut *const ::std::os::raw::c_char, |
| 120 |
outType: *mut glslopt_basic_type, |
| 121 |
outPrec: *mut glslopt_precision, |
| 122 |
outVecSize: *mut ::std::os::raw::c_int, |
| 123 |
outMatSize: *mut ::std::os::raw::c_int, |
| 124 |
outArraySize: *mut ::std::os::raw::c_int, |
| 125 |
outLocation: *mut ::std::os::raw::c_int, |
| 126 |
); |
| 127 |
} |
| 128 |
extern "C" { |
| 129 |
pub fn glslopt_shader_get_stats( |
| 130 |
shader: *mut glslopt_shader, |
| 131 |
approxMath: *mut ::std::os::raw::c_int, |
| 132 |
approxTex: *mut ::std::os::raw::c_int, |
| 133 |
approxFlow: *mut ::std::os::raw::c_int, |
| 134 |
); |
| 135 |
} |