primitives_array.h
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2013 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 
34 #pragma once
35 
36 #include "../api_display.h"
37 #include <memory>
38 #include "../../Core/Math/vec3.h"
39 #include "../2D/color.h"
40 #include "vertex_array_vector.h"
41 
42 namespace clan
43 {
46 
47 class GraphicContext;
48 class Colorf;
49 class Colorf;
50 class GraphicContext;
51 class PrimitivesArray_Impl;
52 class PrimitivesArrayProvider;
53 
54 #define cl_offsetof(s,m) (&(((s *)0)->m))
55 
58 {
66 };
67 
70 {
73 public:
76 
81 
83 
87 public:
89  bool is_null() const { return !impl; }
90 
92  void throw_if_null() const;
93 
96 
100 public:
101 
111  void set_attributes(int index, VertexArrayBuffer &buffer, int size, VertexAttributeDataType type, size_t offset = 0, int stride = 0, bool normalize = false);
112 
113  void set_attributes(int index, VertexArrayVector<unsigned char> &buffer, int size, bool normalize = false)
114  {
115  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_unsigned_byte, 0, 0, normalize);
116  }
117 
118  void set_attributes(int index, VertexArrayVector<char> &buffer, int size, bool normalize = false)
119  {
120  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_byte, 0, 0, normalize);
121  }
122 
123  void set_attributes(int index, VertexArrayVector<unsigned short> &buffer, int size, bool normalize = false)
124  {
125  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_unsigned_short, 0, 0, normalize);
126  }
127 
128  void set_attributes(int index, VertexArrayVector<short> &buffer, int size, bool normalize = false)
129  {
130  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_short, 0, 0, normalize);
131  }
132 
133  void set_attributes(int index, VertexArrayVector<unsigned int> &buffer, int size, bool normalize = false)
134  {
135  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_unsigned_int, 0, 0, normalize);
136  }
137 
138  void set_attributes(int index, VertexArrayVector<int> &buffer, int size, bool normalize = false)
139  {
140  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_int, 0, 0, normalize);
141  }
142 
143  void set_attributes(int index, VertexArrayVector<float> &buffer, int size, bool normalize = false)
144  {
145  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_float, 0, 0, normalize);
146  }
147 
148  void set_attributes(int index, VertexArrayVector<unsigned char> &buffer, bool normalize = false)
149  {
150  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_unsigned_byte, 0, sizeof(unsigned char), normalize);
151  }
152 
153  void set_attributes(int index, VertexArrayVector<signed char> &buffer, bool normalize = false)
154  {
155  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_byte, 0, sizeof(signed char), normalize);
156  }
157 
158  void set_attributes(int index, VertexArrayVector<unsigned short> &buffer, bool normalize = false)
159  {
160  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_unsigned_short, 0, sizeof(unsigned short), normalize);
161  }
162 
163  void set_attributes(int index, VertexArrayVector<signed short> &buffer, bool normalize = false)
164  {
165  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_short, 0, sizeof(signed short), normalize);
166  }
167 
168  void set_attributes(int index, VertexArrayVector<unsigned int> &buffer, bool normalize = false)
169  {
170  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_unsigned_int, 0, sizeof(unsigned int), normalize);
171  }
172 
173  void set_attributes(int index, VertexArrayVector<signed int> &buffer, bool normalize = false)
174  {
175  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_int, 0, sizeof(signed int), normalize);
176  }
177 
178  void set_attributes(int index, VertexArrayVector<float> &buffer)
179  {
180  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_float, 0, sizeof(float), false);
181  }
182 
183  void set_attributes(int index, VertexArrayVector<Vec2ub> &buffer, bool normalize = false)
184  {
185  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_unsigned_byte, 0, sizeof(Vec2ub), normalize);
186  }
187 
188  void set_attributes(int index, VertexArrayVector<Vec2b> &buffer, bool normalize = false)
189  {
190  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_byte, 0, sizeof(Vec2b), normalize);
191  }
192 
193  void set_attributes(int index, VertexArrayVector<Vec2us> &buffer, bool normalize = false)
194  {
195  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_unsigned_short, 0, sizeof(Vec2us), normalize);
196  }
197 
198  void set_attributes(int index, VertexArrayVector<Vec2s> &buffer, bool normalize = false)
199  {
200  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_short, 0, sizeof(Vec2s), normalize);
201  }
202 
203  void set_attributes(int index, VertexArrayVector<Vec2ui> &buffer, bool normalize = false)
204  {
205  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_unsigned_int, 0, sizeof(Vec2ui), normalize);
206  }
207 
208  void set_attributes(int index, VertexArrayVector<Vec2i> &buffer, bool normalize = false)
209  {
210  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_int, 0, sizeof(Vec2i), normalize);
211  }
212 
213  void set_attributes(int index, VertexArrayVector<Vec2f> &buffer)
214  {
215  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_float, 0, sizeof(Vec2f), false);
216  }
217 
218  void set_attributes(int index, VertexArrayVector<Vec3ub> &buffer, bool normalize = false)
219  {
220  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_unsigned_byte, 0, sizeof(Vec3ub), normalize);
221  }
222 
223  void set_attributes(int index, VertexArrayVector<Vec3b> &buffer, bool normalize = false)
224  {
225  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_byte, 0, sizeof(Vec3b), normalize);
226  }
227 
228  void set_attributes(int index, VertexArrayVector<Vec3us> &buffer, bool normalize = false)
229  {
230  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_unsigned_short, 0, sizeof(Vec3us), normalize);
231  }
232 
233  void set_attributes(int index, VertexArrayVector<Vec3s> &buffer, bool normalize = false)
234  {
235  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_short, 0, sizeof(Vec3s), normalize);
236  }
237 
238  void set_attributes(int index, VertexArrayVector<Vec3ui> &buffer, bool normalize = false)
239  {
240  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_unsigned_int, 0, sizeof(Vec3ui), normalize);
241  }
242 
243  void set_attributes(int index, VertexArrayVector<Vec3i> &buffer, bool normalize = false)
244  {
245  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_int, 0, sizeof(Vec3i), normalize);
246  }
247 
248  void set_attributes(int index, VertexArrayVector<Vec3f> &buffer)
249  {
250  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_float, 0, sizeof(Vec3f), false);
251  }
252 
253  void set_attributes(int index, VertexArrayVector<Vec4ub> &buffer, bool normalize = false)
254  {
255  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_unsigned_byte, 0, sizeof(Vec4ub), normalize);
256  }
257 
258  void set_attributes(int index, VertexArrayVector<Vec4b> &buffer, bool normalize = false)
259  {
260  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_byte, 0, sizeof(Vec4b), normalize);
261  }
262 
263  void set_attributes(int index, VertexArrayVector<Vec4us> &buffer, bool normalize = false)
264  {
265  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_unsigned_short, 0, sizeof(Vec4us), normalize);
266  }
267 
268  void set_attributes(int index, VertexArrayVector<Vec4s> &buffer, bool normalize = false)
269  {
270  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_short, 0, sizeof(Vec4s), normalize);
271  }
272 
273  void set_attributes(int index, VertexArrayVector<Vec4ui> &buffer, bool normalize = false)
274  {
275  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_unsigned_int, 0, sizeof(Vec4ui), normalize);
276  }
277 
278  void set_attributes(int index, VertexArrayVector<Vec4i> &buffer, bool normalize = false)
279  {
280  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_int, 0, sizeof(Vec4i), normalize);
281  }
282 
283  void set_attributes(int index, VertexArrayVector<Vec4f> &buffer)
284  {
285  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_float, 0, sizeof(Vec4f), false);
286  }
287 
288  void set_attributes(int index, VertexArrayVector<Colorf> &buffer)
289  {
290  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_float, 0, sizeof(Colorf), false);
291  }
292 
293  template<typename Type>
294  void set_attributes(int index, VertexArrayVector<Type> &buffer, unsigned char *member_offset, bool normalize = false)
295  {
296  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_unsigned_byte, (size_t)member_offset, sizeof(Type), normalize);
297  }
298 
299  template<typename Type>
300  void set_attributes(int index, VertexArrayVector<Type> &buffer, signed char *member_offset, bool normalize = false)
301  {
302  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_byte, (size_t)member_offset, sizeof(Type), normalize);
303  }
304 
305  template<typename Type>
306  void set_attributes(int index, VertexArrayVector<Type> &buffer, unsigned short *member_offset, bool normalize = false)
307  {
308  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_unsigned_short, (size_t)member_offset, sizeof(Type), normalize);
309  }
310 
311  template<typename Type>
312  void set_attributes(int index, VertexArrayVector<Type> &buffer, signed short *member_offset, bool normalize = false)
313  {
314  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_short, (size_t)member_offset, sizeof(Type), normalize);
315  }
316 
317  template<typename Type>
318  void set_attributes(int index, VertexArrayVector<Type> &buffer, unsigned int *member_offset, bool normalize = false)
319  {
320  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_unsigned_int, (size_t)member_offset, sizeof(Type), normalize);
321  }
322 
323  template<typename Type>
324  void set_attributes(int index, VertexArrayVector<Type> &buffer, signed int *member_offset, bool normalize = false)
325  {
326  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_int, (size_t)member_offset, sizeof(Type), normalize);
327  }
328 
329  template<typename Type>
330  void set_attributes(int index, VertexArrayVector<Type> &buffer, float *member_offset)
331  {
332  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_float, (size_t)member_offset, sizeof(Type), false);
333  }
334 
335  template<typename Type>
336  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2ub *member_offset, bool normalize = false)
337  {
338  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_unsigned_byte, (size_t)member_offset, sizeof(Type), normalize);
339  }
340 
341  template<typename Type>
342  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2b *member_offset, bool normalize = false)
343  {
344  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_byte, (size_t)member_offset, sizeof(Type), normalize);
345  }
346 
347  template<typename Type>
348  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2us *member_offset, bool normalize = false)
349  {
350  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_unsigned_short, (size_t)member_offset, sizeof(Type), normalize);
351  }
352 
353  template<typename Type>
354  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2s *member_offset, bool normalize = false)
355  {
356  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_short, (size_t)member_offset, sizeof(Type), normalize);
357  }
358 
359  template<typename Type>
360  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2ui *member_offset, bool normalize = false)
361  {
362  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_unsigned_int, (size_t)member_offset, sizeof(Type), normalize);
363  }
364 
365  template<typename Type>
366  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2i *member_offset, bool normalize = false)
367  {
368  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_int, (size_t)member_offset, sizeof(Type), normalize);
369  }
370 
371  template<typename Type>
372  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec2f *member_offset)
373  {
374  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_float, (size_t)member_offset, sizeof(Type), false);
375  }
376 
377  template<typename Type>
378  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3ub *member_offset, bool normalize = false)
379  {
380  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_unsigned_byte, (size_t)member_offset, sizeof(Type), normalize);
381  }
382 
383  template<typename Type>
384  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3b *member_offset, bool normalize = false)
385  {
386  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_byte, (size_t)member_offset, sizeof(Type), normalize);
387  }
388 
389  template<typename Type>
390  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3us *member_offset, bool normalize = false)
391  {
392  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_unsigned_short, (size_t)member_offset, sizeof(Type), normalize);
393  }
394 
395  template<typename Type>
396  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3s *member_offset, bool normalize = false)
397  {
398  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_short, (size_t)member_offset, sizeof(Type), normalize);
399  }
400 
401  template<typename Type>
402  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3ui *member_offset, bool normalize = false)
403  {
404  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_unsigned_int, (size_t)member_offset, sizeof(Type), normalize);
405  }
406 
407  template<typename Type>
408  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3i *member_offset, bool normalize = false)
409  {
410  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_int, (size_t)member_offset, sizeof(Type), normalize);
411  }
412 
413  template<typename Type>
414  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec3f *member_offset)
415  {
416  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_float, (size_t)member_offset, sizeof(Type), false);
417  }
418 
419  template<typename Type>
420  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4ub *member_offset, bool normalize = false)
421  {
422  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_unsigned_byte, (size_t)member_offset, sizeof(Type), normalize);
423  }
424 
425  template<typename Type>
426  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4b *member_offset, bool normalize = false)
427  {
428  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_byte, (size_t)member_offset, sizeof(Type), normalize);
429  }
430 
431  template<typename Type>
432  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4us *member_offset, bool normalize = false)
433  {
434  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_unsigned_short, (size_t)member_offset, sizeof(Type), normalize);
435  }
436 
437  template<typename Type>
438  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4s *member_offset, bool normalize = false)
439  {
440  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_short, (size_t)member_offset, sizeof(Type), normalize);
441  }
442 
443  template<typename Type>
444  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4ui *member_offset, bool normalize = false)
445  {
446  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_unsigned_int, (size_t)member_offset, sizeof(Type), normalize);
447  }
448 
449  template<typename Type>
450  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4i *member_offset, bool normalize = false)
451  {
452  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_int, (size_t)member_offset, sizeof(Type), normalize);
453  }
454 
455  template<typename Type>
456  void set_attributes(int index, VertexArrayVector<Type> &buffer, Vec4f *member_offset)
457  {
458  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_float, (size_t)member_offset, sizeof(Type), false);
459  }
460 
461  template<typename Type>
462  void set_attributes(int index, VertexArrayVector<Type> &buffer, Colorf *member_offset)
463  {
464  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_float, (size_t)member_offset, sizeof(Type), false);
465  }
469 private:
470  std::shared_ptr<PrimitivesArray_Impl> impl;
471 
473 };
474 
475 }
476 
Primitives array description.
Definition: primitives_array.h:69
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3ub *member_offset, bool normalize=false)
Definition: primitives_array.h:378
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3us *member_offset, bool normalize=false)
Definition: primitives_array.h:390
void set_attributes(int index, VertexArrayVector< Vec2us > &buffer, bool normalize=false)
Definition: primitives_array.h:193
void set_attributes(int index, VertexArrayVector< Colorf > &buffer)
Definition: primitives_array.h:288
void set_attributes(int index, VertexArrayVector< Vec3us > &buffer, bool normalize=false)
Definition: primitives_array.h:228
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2ub *member_offset, bool normalize=false)
Definition: primitives_array.h:336
Floating point color description class (for float).
Definition: color.h:661
Definition: primitives_array.h:65
Interface for implementing a PrimitivesArray target.
Definition: primitives_array_provider.h:41
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3b *member_offset, bool normalize=false)
Definition: primitives_array.h:384
void set_attributes(int index, VertexArrayVector< Vec4ui > &buffer, bool normalize=false)
Definition: primitives_array.h:273
void set_attributes(int index, VertexArrayVector< unsigned char > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:113
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3ui *member_offset, bool normalize=false)
Definition: primitives_array.h:402
void set_attributes(int index, VertexArrayVector< Type > &buffer, signed short *member_offset, bool normalize=false)
Definition: primitives_array.h:312
void set_attributes(int index, VertexArrayVector< Type > &buffer, signed int *member_offset, bool normalize=false)
Definition: primitives_array.h:324
void set_attributes(int index, VertexArrayVector< unsigned int > &buffer, bool normalize=false)
Definition: primitives_array.h:168
Vertex Array Buffer.
Definition: vertex_array_buffer.h:47
void set_attributes(int index, VertexArrayVector< unsigned short > &buffer, bool normalize=false)
Definition: primitives_array.h:158
void set_attributes(int index, VertexArrayVector< unsigned int > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:133
void set_attributes(int index, VertexArrayVector< Vec3f > &buffer)
Definition: primitives_array.h:248
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2ui *member_offset, bool normalize=false)
Definition: primitives_array.h:360
PrimitivesArray()
Construct a null instance.
Definition: primitives_array.h:63
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2f *member_offset)
Definition: primitives_array.h:372
void set_attributes(int index, VertexArrayVector< Vec3ub > &buffer, bool normalize=false)
Definition: primitives_array.h:218
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4us *member_offset, bool normalize=false)
Definition: primitives_array.h:432
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2i *member_offset, bool normalize=false)
Definition: primitives_array.h:366
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4b *member_offset, bool normalize=false)
Definition: primitives_array.h:426
bool is_null() const
Returns true if this object is invalid.
Definition: primitives_array.h:89
void set_attributes(int index, VertexArrayVector< Vec4f > &buffer)
Definition: primitives_array.h:283
void set_attributes(int index, VertexArrayVector< Vec2b > &buffer, bool normalize=false)
Definition: primitives_array.h:188
void set_attributes(int index, VertexArrayVector< Vec3b > &buffer, bool normalize=false)
Definition: primitives_array.h:223
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4s *member_offset, bool normalize=false)
Definition: primitives_array.h:438
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4f *member_offset)
Definition: primitives_array.h:456
void set_attributes(int index, VertexArrayVector< float > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:143
void set_attributes(int index, VertexArrayVector< float > &buffer)
Definition: primitives_array.h:178
void set_attributes(int index, VertexArrayVector< signed int > &buffer, bool normalize=false)
Definition: primitives_array.h:173
void throw_if_null() const
Throw an exception if this object is invalid.
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2s *member_offset, bool normalize=false)
Definition: primitives_array.h:354
void set_attributes(int index, VertexArrayVector< signed short > &buffer, bool normalize=false)
Definition: primitives_array.h:163
void set_attributes(int index, VertexArrayVector< Vec2f > &buffer)
Definition: primitives_array.h:213
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4i *member_offset, bool normalize=false)
Definition: primitives_array.h:450
void set_attributes(int index, VertexArrayVector< signed char > &buffer, bool normalize=false)
Definition: primitives_array.h:153
void set_attributes(int index, VertexArrayVector< unsigned char > &buffer, bool normalize=false)
Definition: primitives_array.h:148
void set_attributes(int index, VertexArrayVector< Type > &buffer, signed char *member_offset, bool normalize=false)
Definition: primitives_array.h:300
PrimitivesArrayProvider * get_provider() const
Returns the target provider for the primitives array.
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3i *member_offset, bool normalize=false)
Definition: primitives_array.h:408
Definition: primitives_array.h:59
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4ub *member_offset, bool normalize=false)
Definition: primitives_array.h:420
void set_attributes(int index, VertexArrayVector< Vec4s > &buffer, bool normalize=false)
Definition: primitives_array.h:268
void set_attributes(int index, VertexArrayVector< Type > &buffer, Colorf *member_offset)
Definition: primitives_array.h:462
void set_attributes(int index, VertexArrayVector< char > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:118
void set_attributes(int index, VertexArrayVector< Vec4i > &buffer, bool normalize=false)
Definition: primitives_array.h:278
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4ui *member_offset, bool normalize=false)
Definition: primitives_array.h:444
Definition: primitives_array.h:60
2D vector
Definition: line.h:49
void set_attributes(int index, VertexArrayBuffer &buffer, int size, VertexAttributeDataType type, size_t offset=0, int stride=0, bool normalize=false)
Set attributes.
Definition: primitives_array.h:64
void set_attributes(int index, VertexArrayVector< Type > &buffer, unsigned short *member_offset, bool normalize=false)
Definition: primitives_array.h:306
void set_attributes(int index, VertexArrayVector< Vec4us > &buffer, bool normalize=false)
Definition: primitives_array.h:263
Definition: primitives_array.h:61
void set_attributes(int index, VertexArrayVector< Vec2ub > &buffer, bool normalize=false)
Definition: primitives_array.h:183
3D vector
Definition: line_ray.h:49
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3s *member_offset, bool normalize=false)
Definition: primitives_array.h:396
Interface to drawing graphics.
Definition: graphic_context.h:257
void set_attributes(int index, VertexArrayVector< Vec4ub > &buffer, bool normalize=false)
Definition: primitives_array.h:253
void set_attributes(int index, VertexArrayVector< Vec3s > &buffer, bool normalize=false)
Definition: primitives_array.h:233
void set_attributes(int index, VertexArrayVector< Vec3ui > &buffer, bool normalize=false)
Definition: primitives_array.h:238
VertexAttributeDataType
Primitives array description.
Definition: primitives_array.h:57
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2b *member_offset, bool normalize=false)
Definition: primitives_array.h:342
void set_attributes(int index, VertexArrayVector< Type > &buffer, unsigned int *member_offset, bool normalize=false)
Definition: primitives_array.h:318
void set_attributes(int index, VertexArrayVector< Vec2ui > &buffer, bool normalize=false)
Definition: primitives_array.h:203
void set_attributes(int index, VertexArrayVector< Vec2s > &buffer, bool normalize=false)
Definition: primitives_array.h:198
void set_attributes(int index, VertexArrayVector< Vec2i > &buffer, bool normalize=false)
Definition: primitives_array.h:208
void set_attributes(int index, VertexArrayVector< Vec4b > &buffer, bool normalize=false)
Definition: primitives_array.h:258
4D vector
Definition: size.h:48
void set_attributes(int index, VertexArrayVector< Type > &buffer, unsigned char *member_offset, bool normalize=false)
Definition: primitives_array.h:294
void set_attributes(int index, VertexArrayVector< short > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:128
void set_attributes(int index, VertexArrayVector< Type > &buffer, float *member_offset)
Definition: primitives_array.h:330
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3f *member_offset)
Definition: primitives_array.h:414
void set_attributes(int index, VertexArrayVector< unsigned short > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:123
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2us *member_offset, bool normalize=false)
Definition: primitives_array.h:348
Definition: primitives_array.h:62
Vertex Array Vector.
Definition: vertex_array_vector.h:43
void set_attributes(int index, VertexArrayVector< Vec3i > &buffer, bool normalize=false)
Definition: primitives_array.h:243
void set_attributes(int index, VertexArrayVector< int > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:138