1use rendering_context::WebGL2RenderingContext;
3use wasm_bindgen::prelude::*;
4
5#[derive(Clone)]
6pub struct WebGLRSUniformLocation<'ctx> {
7 pub(crate) context: &'ctx WebGL2RenderingContext,
8 pub(crate) inner: WebGLUniformLocation,
9}
10
11impl<'ctx> WebGLRSUniformLocation<'ctx> {}
12
13#[wasm_bindgen]
15#[derive(Clone, Copy)]
16extern "C" {
17 #[derive(Clone)]
20 pub type WebGLUniformLocation;
21
22 #[wasm_bindgen(method, js_name = uniform1f)]
24 pub fn uniform_1f(this: &WebGL2RenderingContext, location: &WebGLUniformLocation, v0: f32);
25
26 #[wasm_bindgen(method, js_name = uniform2f)]
28 pub fn uniform_2f(
29 this: &WebGL2RenderingContext,
30 location: &WebGLUniformLocation,
31 v0: f32,
32 v1: f32,
33 );
34
35 #[wasm_bindgen(method, js_name = uniform3f)]
37 pub fn uniform_3f(
38 this: &WebGL2RenderingContext,
39 location: &WebGLUniformLocation,
40 v0: f32,
41 v1: f32,
42 v2: f32,
43 );
44
45 #[wasm_bindgen(method, js_name = uniform4f)]
47 pub fn uniform_4f(
48 this: &WebGL2RenderingContext,
49 location: &WebGLUniformLocation,
50 v0: f32,
51 v1: f32,
52 v2: f32,
53 v3: f32,
54 );
55
56 #[wasm_bindgen(method, js_name = uniform1i)]
58 pub fn uniform_1i(this: &WebGL2RenderingContext, location: &WebGLUniformLocation, v0: i32);
59
60 #[wasm_bindgen(method, js_name = uniform2i)]
62 pub fn uniform_2i(
63 this: &WebGL2RenderingContext,
64 location: &WebGLUniformLocation,
65 v0: i32,
66 v1: i32,
67 );
68
69 #[wasm_bindgen(method, js_name = uniform3i)]
71 pub fn uniform_3i(
72 this: &WebGL2RenderingContext,
73 location: &WebGLUniformLocation,
74 v0: i32,
75 v1: i32,
76 v2: i32,
77 );
78
79 #[wasm_bindgen(method, js_name = uniform4i)]
81 pub fn uniform_4i(
82 this: &WebGL2RenderingContext,
83 location: &WebGLUniformLocation,
84 v0: i32,
85 v1: i32,
86 v2: i32,
87 v3: i32,
88 );
89
90 #[wasm_bindgen(method, js_name = uniform1fv)]
92 pub fn uniform_1fv(
93 this: &WebGL2RenderingContext,
94 location: &WebGLUniformLocation,
95 value: Vec<f32>,
96 );
97
98 #[wasm_bindgen(method, js_name = uniform2fv)]
100 pub fn uniform_2fv(
101 this: &WebGL2RenderingContext,
102 location: &WebGLUniformLocation,
103 value: Vec<f32>,
104 );
105
106 #[wasm_bindgen(method, js_name = uniform3fv)]
108 pub fn uniform_3fv(
109 this: &WebGL2RenderingContext,
110 location: &WebGLUniformLocation,
111 value: Vec<f32>,
112 );
113
114 #[wasm_bindgen(method, js_name = uniform4fv)]
116 pub fn uniform_4fv(
117 this: &WebGL2RenderingContext,
118 location: &WebGLUniformLocation,
119 value: Vec<f32>,
120 );
121
122 #[wasm_bindgen(method, js_name = uniform1iv)]
124 pub fn uniform_1iv(
125 this: &WebGL2RenderingContext,
126 location: &WebGLUniformLocation,
127 value: Vec<i32>,
128 );
129
130 #[wasm_bindgen(method, js_name = uniform2iv)]
132 pub fn uniform_2iv(
133 this: &WebGL2RenderingContext,
134 location: &WebGLUniformLocation,
135 value: Vec<i32>,
136 );
137
138 #[wasm_bindgen(method, js_name = uniform3iv)]
140 pub fn uniform_3iv(
141 this: &WebGL2RenderingContext,
142 location: &WebGLUniformLocation,
143 value: Vec<i32>,
144 );
145
146 #[wasm_bindgen(method, js_name = uniform4iv)]
148 pub fn uniform_4iv(
149 this: &WebGL2RenderingContext,
150 location: &WebGLUniformLocation,
151 value: Vec<i32>,
152 );
153
154 #[wasm_bindgen(method, js_name = uniformMatrix2fv)]
157 pub fn uniform_matrix_2fv(
158 this: &WebGL2RenderingContext,
159 location: &WebGLUniformLocation,
160 transpose: bool,
161 value: Vec<f32>,
162 );
163
164 #[wasm_bindgen(method, js_name = uniformMatrix3fv)]
167 pub fn uniform_matrix_3fv(
168 this: &WebGL2RenderingContext,
169 location: &WebGLUniformLocation,
170 transpose: bool,
171 value: Vec<f32>,
172 );
173
174 #[wasm_bindgen(method, js_name = uniformMatrix4fv)]
177 pub fn uniform_matrix_4fv(
178 this: &WebGL2RenderingContext,
179 location: &WebGLUniformLocation,
180 transpose: bool,
181 value: Vec<f32>,
182 );
183
184 #[wasm_bindgen(method, js_name = uniform1ui)]
186 pub fn uniform_1ui(this: &WebGL2RenderingContext, location: &WebGLUniformLocation, v0: u32);
187
188 #[wasm_bindgen(method, js_name = uniform2ui)]
190 pub fn uniform_2ui(
191 this: &WebGL2RenderingContext,
192 location: &WebGLUniformLocation,
193 v0: u32,
194 v1: u32,
195 );
196
197 #[wasm_bindgen(method, js_name = uniform3ui)]
199 pub fn uniform_3ui(
200 this: &WebGL2RenderingContext,
201 location: &WebGLUniformLocation,
202 v0: u32,
203 v1: u32,
204 v2: u32,
205 );
206
207 #[wasm_bindgen(method, js_name = uniform4ui)]
209 pub fn uniform_4ui(
210 this: &WebGL2RenderingContext,
211 location: &WebGLUniformLocation,
212 v0: u32,
213 v1: u32,
214 v2: u32,
215 v3: u32,
216 );
217
218 #[wasm_bindgen(method, js_name = uniform1uiv)]
220 pub fn uniform_1uiv(
221 this: &WebGL2RenderingContext,
222 location: &WebGLUniformLocation,
223 value: Vec<u32>,
224 );
225
226 #[wasm_bindgen(method, js_name = uniform2uiv)]
228 pub fn uniform_2uiv(
229 this: &WebGL2RenderingContext,
230 location: &WebGLUniformLocation,
231 value: Vec<u32>,
232 );
233
234 #[wasm_bindgen(method, js_name = uniform3uiv)]
236 pub fn uniform_3uiv(
237 this: &WebGL2RenderingContext,
238 location: &WebGLUniformLocation,
239 value: Vec<u32>,
240 );
241
242 #[wasm_bindgen(method, js_name = uniform4uiv)]
244 pub fn uniform_4uiv(
245 this: &WebGL2RenderingContext,
246 location: &WebGLUniformLocation,
247 value: Vec<u32>,
248 );
249
250 #[wasm_bindgen(method, js_name = uniformMatrix2x3fv)]
255 pub fn uniform_matrix_2x3fv(
256 this: &WebGL2RenderingContext,
257 location: &WebGLUniformLocation,
258 transpose: bool,
259 data: Vec<f32>,
260 srcOffset: u32,
261 srcLength: u32,
262 );
263
264 #[wasm_bindgen(method, js_name = uniformMatrix2x4fv)]
267 pub fn uniform_matrix_2x4fv(
268 this: &WebGL2RenderingContext,
269 location: &WebGLUniformLocation,
270 transpose: bool,
271 data: Vec<f32>,
272 srcOffset: u32,
273 srcLength: u32,
274 );
275
276 #[wasm_bindgen(method, js_name = uniformMatrix3x2fv)]
279 pub fn uniform_matrix_3x2fv(
280 this: &WebGL2RenderingContext,
281 location: &WebGLUniformLocation,
282 transpose: bool,
283 data: Vec<f32>,
284 srcOffset: u32,
285 srcLength: u32,
286 );
287
288 #[wasm_bindgen(method, js_name = uniformMatrix3x4fv)]
291 pub fn uniform_matrix_3x4fv(
292 this: &WebGL2RenderingContext,
293 location: &WebGLUniformLocation,
294 transpose: bool,
295 data: Vec<f32>,
296 srcOffset: u32,
297 srcLength: u32,
298 );
299
300 #[wasm_bindgen(method, js_name = uniformMatrix4x2fv)]
303 pub fn uniform_matrix_4x2fv(
304 this: &WebGL2RenderingContext,
305 location: &WebGLUniformLocation,
306 transpose: bool,
307 data: Vec<f32>,
308 srcOffset: u32,
309 srcLength: u32,
310 );
311
312 #[wasm_bindgen(method, js_name = uniformMatrix4x3fv)]
315 pub fn uniform_matrix_4x3fv(
316 this: &WebGL2RenderingContext,
317 location: &WebGLUniformLocation,
318 transpose: bool,
319 data: Vec<f32>,
320 srcOffset: u32,
321 srcLength: u32,
322 );
323}