annotate src/glslang/glslang_c_interface.nim @ 0:5daf3f236d87

add: initial version
author Sam <sam@basx.dev>
date Wed, 14 Dec 2022 00:49:35 +0700
parents
children bb2a7d3a7003
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
1 import
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
2 glslang_c_shader_types
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
3
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
4 type
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
5 glslang_shader_s = object
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
6 glslang_program_s = object
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
7 glslang_shader_t* = glslang_shader_s
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
8 glslang_program_t* = glslang_program_s
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
9
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
10 ## TLimits counterpart
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
11
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
12 type
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
13 glslang_limits_t* {.bycopy.} = object
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
14 non_inductive_for_loops*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
15 while_loops*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
16 do_while_loops*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
17 general_uniform_indexing*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
18 general_attribute_matrix_vector_indexing*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
19 general_varying_indexing*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
20 general_sampler_indexing*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
21 general_variable_indexing*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
22 general_constant_matrix_vector_indexing*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
23
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
24
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
25 ## TBuiltInResource counterpart
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
26
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
27 type
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
28 glslang_resource_t* {.bycopy.} = object
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
29 max_lights*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
30 max_clip_planes*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
31 max_texture_units*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
32 max_texture_coords*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
33 max_vertex_attribs*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
34 max_vertex_uniform_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
35 max_varying_floats*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
36 max_vertex_texture_image_units*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
37 max_combined_texture_image_units*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
38 max_texture_image_units*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
39 max_fragment_uniform_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
40 max_draw_buffers*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
41 max_vertex_uniform_vectors*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
42 max_varying_vectors*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
43 max_fragment_uniform_vectors*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
44 max_vertex_output_vectors*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
45 max_fragment_input_vectors*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
46 min_program_texel_offset*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
47 max_program_texel_offset*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
48 max_clip_distances*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
49 max_compute_work_group_count_x*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
50 max_compute_work_group_count_y*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
51 max_compute_work_group_count_z*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
52 max_compute_work_group_size_x*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
53 max_compute_work_group_size_y*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
54 max_compute_work_group_size_z*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
55 max_compute_uniform_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
56 max_compute_texture_image_units*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
57 max_compute_image_uniforms*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
58 max_compute_atomic_counters*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
59 max_compute_atomic_counter_buffers*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
60 max_varying_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
61 max_vertex_output_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
62 max_geometry_input_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
63 max_geometry_output_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
64 max_fragment_input_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
65 max_image_units*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
66 max_combined_image_units_and_fragment_outputs*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
67 max_combined_shader_output_resources*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
68 max_image_samples*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
69 max_vertex_image_uniforms*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
70 max_tess_control_image_uniforms*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
71 max_tess_evaluation_image_uniforms*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
72 max_geometry_image_uniforms*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
73 max_fragment_image_uniforms*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
74 max_combined_image_uniforms*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
75 max_geometry_texture_image_units*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
76 max_geometry_output_vertices*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
77 max_geometry_total_output_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
78 max_geometry_uniform_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
79 max_geometry_varying_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
80 max_tess_control_input_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
81 max_tess_control_output_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
82 max_tess_control_texture_image_units*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
83 max_tess_control_uniform_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
84 max_tess_control_total_output_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
85 max_tess_evaluation_input_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
86 max_tess_evaluation_output_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
87 max_tess_evaluation_texture_image_units*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
88 max_tess_evaluation_uniform_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
89 max_tess_patch_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
90 max_patch_vertices*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
91 max_tess_gen_level*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
92 max_viewports*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
93 max_vertex_atomic_counters*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
94 max_tess_control_atomic_counters*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
95 max_tess_evaluation_atomic_counters*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
96 max_geometry_atomic_counters*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
97 max_fragment_atomic_counters*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
98 max_combined_atomic_counters*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
99 max_atomic_counter_bindings*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
100 max_vertex_atomic_counter_buffers*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
101 max_tess_control_atomic_counter_buffers*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
102 max_tess_evaluation_atomic_counter_buffers*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
103 max_geometry_atomic_counter_buffers*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
104 max_fragment_atomic_counter_buffers*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
105 max_combined_atomic_counter_buffers*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
106 max_atomic_counter_buffer_size*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
107 max_transform_feedback_buffers*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
108 max_transform_feedback_interleaved_components*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
109 max_cull_distances*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
110 max_combined_clip_and_cull_distances*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
111 max_samples*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
112 max_mesh_output_vertices_nv*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
113 max_mesh_output_primitives_nv*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
114 max_mesh_work_group_size_x_nv*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
115 max_mesh_work_group_size_y_nv*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
116 max_mesh_work_group_size_z_nv*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
117 max_task_work_group_size_x_nv*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
118 max_task_work_group_size_y_nv*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
119 max_task_work_group_size_z_nv*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
120 max_mesh_view_count_nv*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
121 max_mesh_output_vertices_ext*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
122 max_mesh_output_primitives_ext*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
123 max_mesh_work_group_size_x_ext*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
124 max_mesh_work_group_size_y_ext*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
125 max_mesh_work_group_size_z_ext*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
126 max_task_work_group_size_x_ext*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
127 max_task_work_group_size_y_ext*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
128 max_task_work_group_size_z_ext*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
129 max_mesh_view_count_ext*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
130 maxDualSourceDrawBuffersEXT*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
131 limits*: glslang_limits_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
132
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
133 glslang_input_t* {.bycopy.} = object
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
134 language*: glslang_source_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
135 stage*: glslang_stage_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
136 client*: glslang_client_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
137 client_version*: glslang_target_client_version_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
138 target_language*: glslang_target_language_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
139 target_language_version*: glslang_target_language_version_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
140 ## Shader source code
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
141 code*: cstring
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
142 default_version*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
143 default_profile*: glslang_profile_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
144 force_default_version_and_profile*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
145 forward_compatible*: cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
146 messages*: glslang_messages_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
147 resource*: ptr glslang_resource_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
148
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
149
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
150 ## Inclusion result structure allocated by C include_local/include_system callbacks
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
151
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
152 type
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
153 glsl_include_result_t* {.bycopy.} = object
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
154 ## Header file name or NULL if inclusion failed
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
155 header_name*: cstring
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
156 ## Header contents or NULL
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
157 header_data*: cstring
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
158 header_length*: csize_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
159
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
160
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
161 ## Callback for local file inclusion
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
162
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
163 type
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
164 glsl_include_local_func* = proc (ctx: pointer; header_name: cstring;
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
165 includer_name: cstring; include_depth: csize_t): ptr glsl_include_result_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
166
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
167 ## Callback for system file inclusion
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
168
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
169 type
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
170 glsl_include_system_func* = proc (ctx: pointer; header_name: cstring;
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
171 includer_name: cstring; include_depth: csize_t): ptr glsl_include_result_t
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
172
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
173 ## Callback for include result destruction
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
174
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
175 type
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
176 glsl_free_include_result_func* = proc (ctx: pointer;
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
177 result: ptr glsl_include_result_t): cint
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
178
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
179 ## Collection of callbacks for GLSL preprocessor
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
180
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
181 type
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
182 glsl_include_callbacks_t* {.bycopy.} = object
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
183 include_system*: glsl_include_system_func
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
184 include_local*: glsl_include_local_func
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
185 free_include_result*: glsl_free_include_result_func
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
186
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
187
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
188 ## SpvOptions counterpart
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
189
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
190 type
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
191 glslang_spv_options_t* {.bycopy.} = object
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
192 generate_debug_info*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
193 strip_debug_info*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
194 disable_optimizer*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
195 optimize_size*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
196 disassemble*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
197 validate*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
198 emit_nonsemantic_shader_debug_info*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
199 emit_nonsemantic_shader_debug_source*: bool
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
200
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
201
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
202 proc glslang_initialize_process*(): cint {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
203 proc glslang_finalize_process*() {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
204 proc glslang_shader_create*(input: ptr glslang_input_t): ptr glslang_shader_t {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
205 proc glslang_shader_delete*(shader: ptr glslang_shader_t) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
206 proc glslang_shader_set_preamble*(shader: ptr glslang_shader_t; s: cstring) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
207 proc glslang_shader_shift_binding*(shader: ptr glslang_shader_t; res: glslang_resource_type_t; base: cuint) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
208 proc glslang_shader_shift_binding_for_set*(shader: ptr glslang_shader_t; res: glslang_resource_type_t; base: cuint; set: cuint) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
209 proc glslang_shader_set_options*(shader: ptr glslang_shader_t; options: cint) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
210
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
211 proc glslang_shader_set_glsl_version*(shader: ptr glslang_shader_t; version: cint) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
212 proc glslang_shader_preprocess*(shader: ptr glslang_shader_t; input: ptr glslang_input_t): cint {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
213 proc glslang_shader_parse*(shader: ptr glslang_shader_t; input: ptr glslang_input_t): cint {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
214 proc glslang_shader_get_preprocessed_code*(shader: ptr glslang_shader_t): cstring {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
215 proc glslang_shader_get_info_log*(shader: ptr glslang_shader_t): cstring {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
216 proc glslang_shader_get_info_debug_log*(shader: ptr glslang_shader_t): cstring {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
217 proc glslang_program_create*(): ptr glslang_program_t {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
218 proc glslang_program_delete*(program: ptr glslang_program_t) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
219 proc glslang_program_add_shader*(program: ptr glslang_program_t; shader: ptr glslang_shader_t) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
220 proc glslang_program_link*(program: ptr glslang_program_t; messages: cint): cint {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
221
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
222 proc glslang_program_add_source_text*(program: ptr glslang_program_t; stage: glslang_stage_t; text: cstring; len: csize_t) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
223 proc glslang_program_set_source_file*(program: ptr glslang_program_t; stage: glslang_stage_t; file: cstring) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
224 proc glslang_program_map_io*(program: ptr glslang_program_t): cint {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
225 proc glslang_program_SPIRV_generate*(program: ptr glslang_program_t; stage: glslang_stage_t) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
226 proc glslang_program_SPIRV_generate_with_options*(program: ptr glslang_program_t; stage: glslang_stage_t; spv_options: ptr glslang_spv_options_t) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
227 proc glslang_program_SPIRV_get_size*(program: ptr glslang_program_t): csize_t {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
228 proc glslang_program_SPIRV_get*(program: ptr glslang_program_t; a2: ptr cuint) {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
229 proc glslang_program_SPIRV_get_ptr*(program: ptr glslang_program_t): ptr cuint {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
230 proc glslang_program_SPIRV_get_messages*(program: ptr glslang_program_t): cstring {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
231 proc glslang_program_get_info_log*(program: ptr glslang_program_t): cstring {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
232 proc glslang_program_get_info_debug_log*(program: ptr glslang_program_t): cstring {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
233
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
234 proc glslang_default_resource*(): ptr glslang_resource_t {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
235 proc glslang_default_resource_string*(): cstring {.importc.}
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
236 proc glslang_decode_resource_limits*(resources: ptr glslang_resource_t , config: cstring) {.importc.}