primitives_array.h
1/*
2** ClanLib SDK
3** Copyright (c) 1997-2020 The ClanLib Team
4**
5** This software is provided 'as-is', without any express or implied
6** warranty. In no event will the authors be held liable for any damages
7** arising from the use of this software.
8**
9** Permission is granted to anyone to use this software for any purpose,
10** including commercial applications, and to alter it and redistribute it
11** freely, subject to the following restrictions:
12**
13** 1. The origin of this software must not be misrepresented; you must not
14** claim that you wrote the original software. If you use this software
15** in a product, an acknowledgment in the product documentation would be
16** appreciated but is not required.
17** 2. Altered source versions must be plainly marked as such, and must not be
18** misrepresented as being the original software.
19** 3. This notice may not be removed or altered from any source distribution.
20**
21** Note: Some of the libraries ClanLib may link to may have additional
22** requirements or restrictions.
23**
24** File Author(s):
25**
26** Magnus Norddahl
27** Harry Storbacka
28** Mark Page
29** Kenneth Gangstoe
30**
31*/
32
33#pragma once
34
35#include <memory>
36#include "../../Core/Math/vec3.h"
37#include "../2D/color.h"
38#include "vertex_array_vector.h"
39
40namespace clan
41{
44
45 class GraphicContext;
46 class Colorf;
47 class Colorf;
48 class GraphicContext;
49 class PrimitivesArray_Impl;
50 class PrimitivesArrayProvider;
51
52 #define cl_offsetof(s,m) (&(((s *)0)->m))
53
56 {
64 };
65
68 {
69 public:
72
77
79
81 bool is_null() const { return !impl; }
82 explicit operator bool() const { return bool(impl); }
83
85 void throw_if_null() const;
86
89
99 void set_attributes(int index, VertexArrayBuffer &buffer, int size, VertexAttributeDataType type, size_t offset = 0, int stride = 0, bool normalize = false);
100
101 void set_attributes(int index, VertexArrayVector<unsigned char> &buffer, int size, bool normalize = false)
102 {
104 }
105
106 void set_attributes(int index, VertexArrayVector<char> &buffer, int size, bool normalize = false)
107 {
108 set_attributes(index, (VertexArrayBuffer&)buffer, size, VertexAttributeDataType::type_byte, 0, 0, normalize);
109 }
110
111 void set_attributes(int index, VertexArrayVector<unsigned short> &buffer, int size, bool normalize = false)
112 {
114 }
115
116 void set_attributes(int index, VertexArrayVector<short> &buffer, int size, bool normalize = false)
117 {
118 set_attributes(index, (VertexArrayBuffer&)buffer, size, VertexAttributeDataType::type_short, 0, 0, normalize);
119 }
120
121 void set_attributes(int index, VertexArrayVector<unsigned int> &buffer, int size, bool normalize = false)
122 {
123 set_attributes(index, (VertexArrayBuffer&)buffer, size, VertexAttributeDataType::type_unsigned_int, 0, 0, normalize);
124 }
125
126 void set_attributes(int index, VertexArrayVector<int> &buffer, int size, bool normalize = false)
127 {
128 set_attributes(index, (VertexArrayBuffer&)buffer, size, VertexAttributeDataType::type_int, 0, 0, normalize);
129 }
130
131 void set_attributes(int index, VertexArrayVector<float> &buffer, int size, bool normalize = false)
132 {
133 set_attributes(index, (VertexArrayBuffer&)buffer, size, VertexAttributeDataType::type_float, 0, 0, normalize);
134 }
135
136 void set_attributes(int index, VertexArrayVector<unsigned char> &buffer, bool normalize = false)
137 {
138 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_unsigned_byte, 0, sizeof(unsigned char), normalize);
139 }
140
141 void set_attributes(int index, VertexArrayVector<signed char> &buffer, bool normalize = false)
142 {
143 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_byte, 0, sizeof(signed char), normalize);
144 }
145
146 void set_attributes(int index, VertexArrayVector<unsigned short> &buffer, bool normalize = false)
147 {
148 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_unsigned_short, 0, sizeof(unsigned short), normalize);
149 }
150
151 void set_attributes(int index, VertexArrayVector<signed short> &buffer, bool normalize = false)
152 {
153 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_short, 0, sizeof(signed short), normalize);
154 }
155
156 void set_attributes(int index, VertexArrayVector<unsigned int> &buffer, bool normalize = false)
157 {
158 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_unsigned_int, 0, sizeof(unsigned int), normalize);
159 }
160
161 void set_attributes(int index, VertexArrayVector<signed int> &buffer, bool normalize = false)
162 {
163 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_int, 0, sizeof(signed int), normalize);
164 }
165
167 {
168 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_float, 0, sizeof(float), false);
169 }
170
171 void set_attributes(int index, VertexArrayVector<Vec2ub> &buffer, bool normalize = false)
172 {
174 }
175
176 void set_attributes(int index, VertexArrayVector<Vec2b> &buffer, bool normalize = false)
177 {
178 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_byte, 0, sizeof(Vec2b), normalize);
179 }
180
181 void set_attributes(int index, VertexArrayVector<Vec2us> &buffer, bool normalize = false)
182 {
184 }
185
186 void set_attributes(int index, VertexArrayVector<Vec2s> &buffer, bool normalize = false)
187 {
188 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_short, 0, sizeof(Vec2s), normalize);
189 }
190
191 void set_attributes(int index, VertexArrayVector<Vec2ui> &buffer, bool normalize = false)
192 {
193 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_unsigned_int, 0, sizeof(Vec2ui), normalize);
194 }
195
196 void set_attributes(int index, VertexArrayVector<Vec2i> &buffer, bool normalize = false)
197 {
198 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_int, 0, sizeof(Vec2i), normalize);
199 }
200
202 {
203 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_float, 0, sizeof(Vec2f), false);
204 }
205
206 void set_attributes(int index, VertexArrayVector<Vec3ub> &buffer, bool normalize = false)
207 {
209 }
210
211 void set_attributes(int index, VertexArrayVector<Vec3b> &buffer, bool normalize = false)
212 {
213 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_byte, 0, sizeof(Vec3b), normalize);
214 }
215
216 void set_attributes(int index, VertexArrayVector<Vec3us> &buffer, bool normalize = false)
217 {
219 }
220
221 void set_attributes(int index, VertexArrayVector<Vec3s> &buffer, bool normalize = false)
222 {
223 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_short, 0, sizeof(Vec3s), normalize);
224 }
225
226 void set_attributes(int index, VertexArrayVector<Vec3ui> &buffer, bool normalize = false)
227 {
228 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_unsigned_int, 0, sizeof(Vec3ui), normalize);
229 }
230
231 void set_attributes(int index, VertexArrayVector<Vec3i> &buffer, bool normalize = false)
232 {
233 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_int, 0, sizeof(Vec3i), normalize);
234 }
235
237 {
238 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_float, 0, sizeof(Vec3f), false);
239 }
240
241 void set_attributes(int index, VertexArrayVector<Vec4ub> &buffer, bool normalize = false)
242 {
244 }
245
246 void set_attributes(int index, VertexArrayVector<Vec4b> &buffer, bool normalize = false)
247 {
248 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_byte, 0, sizeof(Vec4b), normalize);
249 }
250
251 void set_attributes(int index, VertexArrayVector<Vec4us> &buffer, bool normalize = false)
252 {
254 }
255
256 void set_attributes(int index, VertexArrayVector<Vec4s> &buffer, bool normalize = false)
257 {
258 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_short, 0, sizeof(Vec4s), normalize);
259 }
260
261 void set_attributes(int index, VertexArrayVector<Vec4ui> &buffer, bool normalize = false)
262 {
263 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_unsigned_int, 0, sizeof(Vec4ui), normalize);
264 }
265
266 void set_attributes(int index, VertexArrayVector<Vec4i> &buffer, bool normalize = false)
267 {
268 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_int, 0, sizeof(Vec4i), normalize);
269 }
270
272 {
273 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_float, 0, sizeof(Vec4f), false);
274 }
275
277 {
278 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_float, 0, sizeof(Colorf), false);
279 }
280
281 template<typename Type>
282 void set_attributes(int index, VertexArrayVector<Type> &buffer, unsigned char *member_offset, bool normalize = false)
283 {
284 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_unsigned_byte, (size_t)member_offset, sizeof(Type), normalize);
285 }
286
287 template<typename Type>
288 void set_attributes(int index, VertexArrayVector<Type> &buffer, signed char *member_offset, bool normalize = false)
289 {
290 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_byte, (size_t)member_offset, sizeof(Type), normalize);
291 }
292
293 template<typename Type>
294 void set_attributes(int index, VertexArrayVector<Type> &buffer, unsigned short *member_offset, bool normalize = false)
295 {
296 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_unsigned_short, (size_t)member_offset, sizeof(Type), normalize);
297 }
298
299 template<typename Type>
300 void set_attributes(int index, VertexArrayVector<Type> &buffer, signed short *member_offset, bool normalize = false)
301 {
302 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_short, (size_t)member_offset, sizeof(Type), normalize);
303 }
304
305 template<typename Type>
306 void set_attributes(int index, VertexArrayVector<Type> &buffer, unsigned int *member_offset, bool normalize = false)
307 {
308 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_unsigned_int, (size_t)member_offset, sizeof(Type), normalize);
309 }
310
311 template<typename Type>
312 void set_attributes(int index, VertexArrayVector<Type> &buffer, signed int *member_offset, bool normalize = false)
313 {
314 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_int, (size_t)member_offset, sizeof(Type), normalize);
315 }
316
317 template<typename Type>
318 void set_attributes(int index, VertexArrayVector<Type> &buffer, float *member_offset)
319 {
320 set_attributes(index, (VertexArrayBuffer&)buffer, 1, VertexAttributeDataType::type_float, (size_t)member_offset, sizeof(Type), false);
321 }
322
323 template<typename Type>
324 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2ub *member_offset, bool normalize = false)
325 {
326 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_unsigned_byte, (size_t)member_offset, sizeof(Type), normalize);
327 }
328
329 template<typename Type>
330 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2b *member_offset, bool normalize = false)
331 {
332 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_byte, (size_t)member_offset, sizeof(Type), normalize);
333 }
334
335 template<typename Type>
336 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2us *member_offset, bool normalize = false)
337 {
338 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_unsigned_short, (size_t)member_offset, sizeof(Type), normalize);
339 }
340
341 template<typename Type>
342 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2s *member_offset, bool normalize = false)
343 {
344 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_short, (size_t)member_offset, sizeof(Type), normalize);
345 }
346
347 template<typename Type>
348 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2ui *member_offset, bool normalize = false)
349 {
350 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_unsigned_int, (size_t)member_offset, sizeof(Type), normalize);
351 }
352
353 template<typename Type>
354 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2i *member_offset, bool normalize = false)
355 {
356 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_int, (size_t)member_offset, sizeof(Type), normalize);
357 }
358
359 template<typename Type>
360 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2f *member_offset)
361 {
362 set_attributes(index, (VertexArrayBuffer&)buffer, 2, VertexAttributeDataType::type_float, (size_t)member_offset, sizeof(Type), false);
363 }
364
365 template<typename Type>
366 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3ub *member_offset, bool normalize = false)
367 {
368 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_unsigned_byte, (size_t)member_offset, sizeof(Type), normalize);
369 }
370
371 template<typename Type>
372 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3b *member_offset, bool normalize = false)
373 {
374 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_byte, (size_t)member_offset, sizeof(Type), normalize);
375 }
376
377 template<typename Type>
378 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3us *member_offset, bool normalize = false)
379 {
380 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_unsigned_short, (size_t)member_offset, sizeof(Type), normalize);
381 }
382
383 template<typename Type>
384 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3s *member_offset, bool normalize = false)
385 {
386 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_short, (size_t)member_offset, sizeof(Type), normalize);
387 }
388
389 template<typename Type>
390 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3ui *member_offset, bool normalize = false)
391 {
392 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_unsigned_int, (size_t)member_offset, sizeof(Type), normalize);
393 }
394
395 template<typename Type>
396 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3i *member_offset, bool normalize = false)
397 {
398 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_int, (size_t)member_offset, sizeof(Type), normalize);
399 }
400
401 template<typename Type>
402 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3f *member_offset)
403 {
404 set_attributes(index, (VertexArrayBuffer&)buffer, 3, VertexAttributeDataType::type_float, (size_t)member_offset, sizeof(Type), false);
405 }
406
407 template<typename Type>
408 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4ub *member_offset, bool normalize = false)
409 {
410 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_unsigned_byte, (size_t)member_offset, sizeof(Type), normalize);
411 }
412
413 template<typename Type>
414 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4b *member_offset, bool normalize = false)
415 {
416 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_byte, (size_t)member_offset, sizeof(Type), normalize);
417 }
418
419 template<typename Type>
420 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4us *member_offset, bool normalize = false)
421 {
422 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_unsigned_short, (size_t)member_offset, sizeof(Type), normalize);
423 }
424
425 template<typename Type>
426 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4s *member_offset, bool normalize = false)
427 {
428 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_short, (size_t)member_offset, sizeof(Type), normalize);
429 }
430
431 template<typename Type>
432 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4ui *member_offset, bool normalize = false)
433 {
434 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_unsigned_int, (size_t)member_offset, sizeof(Type), normalize);
435 }
436
437 template<typename Type>
438 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4i *member_offset, bool normalize = false)
439 {
440 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_int, (size_t)member_offset, sizeof(Type), normalize);
441 }
442
443 template<typename Type>
444 void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4f *member_offset)
445 {
446 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_float, (size_t)member_offset, sizeof(Type), false);
447 }
448
449 template<typename Type>
450 void set_attributes(int index, VertexArrayVector<Type> &buffer, Colorf *member_offset)
451 {
452 set_attributes(index, (VertexArrayBuffer&)buffer, 4, VertexAttributeDataType::type_float, (size_t)member_offset, sizeof(Type), false);
453 }
454
455 private:
456 std::shared_ptr<PrimitivesArray_Impl> impl;
457 };
458
460}
Floating point color description class (for float).
Definition: color.h:799
Interface to drawing graphics.
Definition: graphic_context.h:257
Interface for implementing a PrimitivesArray target.
Definition: primitives_array_provider.h:40
Primitives array description.
Definition: primitives_array.h:68
void set_attributes(int index, VertexArrayVector< Type > &buffer, signed char *member_offset, bool normalize=false)
Definition: primitives_array.h:288
void set_attributes(int index, VertexArrayVector< Vec3us > &buffer, bool normalize=false)
Definition: primitives_array.h:216
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3ub *member_offset, bool normalize=false)
Definition: primitives_array.h:366
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2us *member_offset, bool normalize=false)
Definition: primitives_array.h:336
void set_attributes(int index, VertexArrayVector< unsigned char > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:101
void set_attributes(int index, VertexArrayVector< Vec4s > &buffer, bool normalize=false)
Definition: primitives_array.h:256
void set_attributes(int index, VertexArrayVector< Type > &buffer, signed short *member_offset, bool normalize=false)
Definition: primitives_array.h:300
PrimitivesArray()
Construct a null instance.
void set_attributes(int index, VertexArrayVector< signed char > &buffer, bool normalize=false)
Definition: primitives_array.h:141
void set_attributes(int index, VertexArrayVector< float > &buffer)
Definition: primitives_array.h:166
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2ui *member_offset, bool normalize=false)
Definition: primitives_array.h:348
void set_attributes(int index, VertexArrayVector< char > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:106
void set_attributes(int index, VertexArrayVector< unsigned int > &buffer, bool normalize=false)
Definition: primitives_array.h:156
void set_attributes(int index, VertexArrayVector< Vec2s > &buffer, bool normalize=false)
Definition: primitives_array.h:186
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2i *member_offset, bool normalize=false)
Definition: primitives_array.h:354
PrimitivesArray(GraphicContext &gc)
Constructs a PrimitivesArray.
void set_attributes(int index, VertexArrayVector< Vec2us > &buffer, bool normalize=false)
Definition: primitives_array.h:181
void set_attributes(int index, VertexArrayVector< Vec3i > &buffer, bool normalize=false)
Definition: primitives_array.h:231
PrimitivesArrayProvider * get_provider() const
Returns the target provider for the primitives array.
void set_attributes(int index, VertexArrayVector< Vec4b > &buffer, bool normalize=false)
Definition: primitives_array.h:246
void set_attributes(int index, VertexArrayVector< unsigned short > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:111
void set_attributes(int index, VertexArrayBuffer &buffer, int size, VertexAttributeDataType type, size_t offset=0, int stride=0, bool normalize=false)
Set attributes.
void set_attributes(int index, VertexArrayVector< Vec3b > &buffer, bool normalize=false)
Definition: primitives_array.h:211
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4us *member_offset, bool normalize=false)
Definition: primitives_array.h:420
void set_attributes(int index, VertexArrayVector< Type > &buffer, float *member_offset)
Definition: primitives_array.h:318
void set_attributes(int index, VertexArrayVector< Type > &buffer, unsigned int *member_offset, bool normalize=false)
Definition: primitives_array.h:306
void set_attributes(int index, VertexArrayVector< Vec3ui > &buffer, bool normalize=false)
Definition: primitives_array.h:226
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3ui *member_offset, bool normalize=false)
Definition: primitives_array.h:390
void set_attributes(int index, VertexArrayVector< signed short > &buffer, bool normalize=false)
Definition: primitives_array.h:151
void set_attributes(int index, VertexArrayVector< Vec4ub > &buffer, bool normalize=false)
Definition: primitives_array.h:241
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2s *member_offset, bool normalize=false)
Definition: primitives_array.h:342
void set_attributes(int index, VertexArrayVector< Vec4us > &buffer, bool normalize=false)
Definition: primitives_array.h:251
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4f *member_offset)
Definition: primitives_array.h:444
void set_attributes(int index, VertexArrayVector< unsigned short > &buffer, bool normalize=false)
Definition: primitives_array.h:146
bool is_null() const
Returns true if this object is invalid.
Definition: primitives_array.h:81
void set_attributes(int index, VertexArrayVector< Type > &buffer, signed int *member_offset, bool normalize=false)
Definition: primitives_array.h:312
void set_attributes(int index, VertexArrayVector< Vec4ui > &buffer, bool normalize=false)
Definition: primitives_array.h:261
void set_attributes(int index, VertexArrayVector< signed int > &buffer, bool normalize=false)
Definition: primitives_array.h:161
void set_attributes(int index, VertexArrayVector< Vec4f > &buffer)
Definition: primitives_array.h:271
void set_attributes(int index, VertexArrayVector< Vec2ui > &buffer, bool normalize=false)
Definition: primitives_array.h:191
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3i *member_offset, bool normalize=false)
Definition: primitives_array.h:396
void set_attributes(int index, VertexArrayVector< unsigned int > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:121
void set_attributes(int index, VertexArrayVector< Type > &buffer, unsigned char *member_offset, bool normalize=false)
Definition: primitives_array.h:282
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4ui *member_offset, bool normalize=false)
Definition: primitives_array.h:432
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3f *member_offset)
Definition: primitives_array.h:402
void set_attributes(int index, VertexArrayVector< Type > &buffer, unsigned short *member_offset, bool normalize=false)
Definition: primitives_array.h:294
void set_attributes(int index, VertexArrayVector< Vec4i > &buffer, bool normalize=false)
Definition: primitives_array.h:266
void set_attributes(int index, VertexArrayVector< int > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:126
void set_attributes(int index, VertexArrayVector< Vec2i > &buffer, bool normalize=false)
Definition: primitives_array.h:196
void set_attributes(int index, VertexArrayVector< Vec3f > &buffer)
Definition: primitives_array.h:236
void set_attributes(int index, VertexArrayVector< short > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:116
void set_attributes(int index, VertexArrayVector< Vec3ub > &buffer, bool normalize=false)
Definition: primitives_array.h:206
void throw_if_null() const
Throw an exception if this object is invalid.
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4i *member_offset, bool normalize=false)
Definition: primitives_array.h:438
void set_attributes(int index, VertexArrayVector< Vec2ub > &buffer, bool normalize=false)
Definition: primitives_array.h:171
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3s *member_offset, bool normalize=false)
Definition: primitives_array.h:384
void set_attributes(int index, VertexArrayVector< float > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:131
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2ub *member_offset, bool normalize=false)
Definition: primitives_array.h:324
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2b *member_offset, bool normalize=false)
Definition: primitives_array.h:330
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2f *member_offset)
Definition: primitives_array.h:360
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3b *member_offset, bool normalize=false)
Definition: primitives_array.h:372
void set_attributes(int index, VertexArrayVector< Colorf > &buffer)
Definition: primitives_array.h:276
void set_attributes(int index, VertexArrayVector< Vec2b > &buffer, bool normalize=false)
Definition: primitives_array.h:176
void set_attributes(int index, VertexArrayVector< Vec2f > &buffer)
Definition: primitives_array.h:201
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4b *member_offset, bool normalize=false)
Definition: primitives_array.h:414
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3us *member_offset, bool normalize=false)
Definition: primitives_array.h:378
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4ub *member_offset, bool normalize=false)
Definition: primitives_array.h:408
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4s *member_offset, bool normalize=false)
Definition: primitives_array.h:426
void set_attributes(int index, VertexArrayVector< Type > &buffer, Colorf *member_offset)
Definition: primitives_array.h:450
void set_attributes(int index, VertexArrayVector< unsigned char > &buffer, bool normalize=false)
Definition: primitives_array.h:136
void set_attributes(int index, VertexArrayVector< Vec3s > &buffer, bool normalize=false)
Definition: primitives_array.h:221
2D vector
Definition: vec2.h:76
3D vector
Definition: vec3.h:75
4D vector
Definition: vec4.h:75
Vertex Array Buffer.
Definition: vertex_array_buffer.h:46
Vertex Array Vector.
Definition: vertex_array_vector.h:43
VertexAttributeDataType
Primitives array description.
Definition: primitives_array.h:56
Definition: clanapp.h:36