primitives_array.h
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2016 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 
40 namespace 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  {
103  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_unsigned_byte, 0, 0, normalize);
104  }
105 
106  void set_attributes(int index, VertexArrayVector<char> &buffer, int size, bool normalize = false)
107  {
108  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_byte, 0, 0, normalize);
109  }
110 
111  void set_attributes(int index, VertexArrayVector<unsigned short> &buffer, int size, bool normalize = false)
112  {
113  set_attributes(index, (VertexArrayBuffer&)buffer, size, type_unsigned_short, 0, 0, normalize);
114  }
115 
116  void set_attributes(int index, VertexArrayVector<short> &buffer, int size, bool normalize = false)
117  {
118  set_attributes(index, (VertexArrayBuffer&)buffer, size, 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, 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, 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, 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, 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, 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, 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, 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, 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, type_int, 0, sizeof(signed int), normalize);
164  }
165 
166  void set_attributes(int index, VertexArrayVector<float> &buffer)
167  {
168  set_attributes(index, (VertexArrayBuffer&)buffer, 1, type_float, 0, sizeof(float), false);
169  }
170 
171  void set_attributes(int index, VertexArrayVector<Vec2ub> &buffer, bool normalize = false)
172  {
173  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_unsigned_byte, 0, sizeof(Vec2ub), normalize);
174  }
175 
176  void set_attributes(int index, VertexArrayVector<Vec2b> &buffer, bool normalize = false)
177  {
178  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_byte, 0, sizeof(Vec2b), normalize);
179  }
180 
181  void set_attributes(int index, VertexArrayVector<Vec2us> &buffer, bool normalize = false)
182  {
183  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_unsigned_short, 0, sizeof(Vec2us), normalize);
184  }
185 
186  void set_attributes(int index, VertexArrayVector<Vec2s> &buffer, bool normalize = false)
187  {
188  set_attributes(index, (VertexArrayBuffer&)buffer, 2, 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, 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, type_int, 0, sizeof(Vec2i), normalize);
199  }
200 
201  void set_attributes(int index, VertexArrayVector<Vec2f> &buffer)
202  {
203  set_attributes(index, (VertexArrayBuffer&)buffer, 2, type_float, 0, sizeof(Vec2f), false);
204  }
205 
206  void set_attributes(int index, VertexArrayVector<Vec3ub> &buffer, bool normalize = false)
207  {
208  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_unsigned_byte, 0, sizeof(Vec3ub), normalize);
209  }
210 
211  void set_attributes(int index, VertexArrayVector<Vec3b> &buffer, bool normalize = false)
212  {
213  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_byte, 0, sizeof(Vec3b), normalize);
214  }
215 
216  void set_attributes(int index, VertexArrayVector<Vec3us> &buffer, bool normalize = false)
217  {
218  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_unsigned_short, 0, sizeof(Vec3us), normalize);
219  }
220 
221  void set_attributes(int index, VertexArrayVector<Vec3s> &buffer, bool normalize = false)
222  {
223  set_attributes(index, (VertexArrayBuffer&)buffer, 3, 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, 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, type_int, 0, sizeof(Vec3i), normalize);
234  }
235 
236  void set_attributes(int index, VertexArrayVector<Vec3f> &buffer)
237  {
238  set_attributes(index, (VertexArrayBuffer&)buffer, 3, type_float, 0, sizeof(Vec3f), false);
239  }
240 
241  void set_attributes(int index, VertexArrayVector<Vec4ub> &buffer, bool normalize = false)
242  {
243  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_unsigned_byte, 0, sizeof(Vec4ub), normalize);
244  }
245 
246  void set_attributes(int index, VertexArrayVector<Vec4b> &buffer, bool normalize = false)
247  {
248  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_byte, 0, sizeof(Vec4b), normalize);
249  }
250 
251  void set_attributes(int index, VertexArrayVector<Vec4us> &buffer, bool normalize = false)
252  {
253  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_unsigned_short, 0, sizeof(Vec4us), normalize);
254  }
255 
256  void set_attributes(int index, VertexArrayVector<Vec4s> &buffer, bool normalize = false)
257  {
258  set_attributes(index, (VertexArrayBuffer&)buffer, 4, 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, 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, type_int, 0, sizeof(Vec4i), normalize);
269  }
270 
271  void set_attributes(int index, VertexArrayVector<Vec4f> &buffer)
272  {
273  set_attributes(index, (VertexArrayBuffer&)buffer, 4, type_float, 0, sizeof(Vec4f), false);
274  }
275 
276  void set_attributes(int index, VertexArrayVector<Colorf> &buffer)
277  {
278  set_attributes(index, (VertexArrayBuffer&)buffer, 4, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, type_float, (size_t)member_offset, sizeof(Type), false);
453  }
454 
455  private:
456  std::shared_ptr<PrimitivesArray_Impl> impl;
457  };
458 
460 }
void set_attributes(int index, VertexArrayVector< unsigned char > &buffer, bool normalize=false)
Definition: primitives_array.h:136
Primitives array description.
Definition: primitives_array.h:67
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.
Definition: clanapp.h:35
void set_attributes(int index, VertexArrayVector< Vec3b > &buffer, bool normalize=false)
Definition: primitives_array.h:211
Floating point color description class (for float).
Definition: color.h:798
void set_attributes(int index, VertexArrayVector< Vec4f > &buffer)
Definition: primitives_array.h:271
Definition: primitives_array.h:63
Interface for implementing a PrimitivesArray target.
Definition: primitives_array_provider.h:39
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< Type > &buffer, Vec3ui *member_offset, bool normalize=false)
Definition: primitives_array.h:390
void set_attributes(int index, VertexArrayVector< Vec4s > &buffer, bool normalize=false)
Definition: primitives_array.h:256
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2i *member_offset, bool normalize=false)
Definition: primitives_array.h:354
4D vector
Definition: size.h:47
2D vector
Definition: line.h:46
Vertex Array Buffer.
Definition: vertex_array_buffer.h:45
void set_attributes(int index, VertexArrayVector< unsigned short > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:111
void set_attributes(int index, VertexArrayVector< Vec3i > &buffer, bool normalize=false)
Definition: primitives_array.h:231
void set_attributes(int index, VertexArrayVector< Vec2i > &buffer, bool normalize=false)
Definition: primitives_array.h:196
void set_attributes(int index, VertexArrayVector< unsigned int > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:121
Definition: primitives_array.h:61
void set_attributes(int index, VertexArrayVector< short > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:116
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3f *member_offset)
Definition: primitives_array.h:402
void set_attributes(int index, VertexArrayVector< Vec3ui > &buffer, bool normalize=false)
Definition: primitives_array.h:226
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< float > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:131
void set_attributes(int index, VertexArrayVector< char > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:106
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< Vec4us > &buffer, bool normalize=false)
Definition: primitives_array.h:251
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< 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, Vec2s *member_offset, bool normalize=false)
Definition: primitives_array.h:342
PrimitivesArrayProvider * get_provider() const
Returns the target provider for the primitives array.
void set_attributes(int index, VertexArrayVector< Type > &buffer, Colorf *member_offset)
Definition: primitives_array.h:450
void set_attributes(int index, VertexArrayVector< Type > &buffer, float *member_offset)
Definition: primitives_array.h:318
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< Type > &buffer, unsigned short *member_offset, bool normalize=false)
Definition: primitives_array.h:294
void set_attributes(int index, VertexArrayVector< signed short > &buffer, bool normalize=false)
Definition: primitives_array.h:151
Definition: primitives_array.h:57
void set_attributes(int index, VertexArrayVector< Colorf > &buffer)
Definition: primitives_array.h:276
void set_attributes(int index, VertexArrayVector< Vec4ui > &buffer, bool normalize=false)
Definition: primitives_array.h:261
void set_attributes(int index, VertexArrayVector< Vec2ub > &buffer, bool normalize=false)
Definition: primitives_array.h:171
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< int > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:126
void set_attributes(int index, VertexArrayVector< Vec2b > &buffer, bool normalize=false)
Definition: primitives_array.h:176
void set_attributes(int index, VertexArrayVector< Vec4ub > &buffer, bool normalize=false)
Definition: primitives_array.h:241
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec2f *member_offset)
Definition: primitives_array.h:360
Definition: primitives_array.h:58
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< Vec2f > &buffer)
Definition: primitives_array.h:201
bool is_null() const
Returns true if this object is invalid.
Definition: primitives_array.h:81
Definition: primitives_array.h:62
void set_attributes(int index, VertexArrayVector< Vec4b > &buffer, bool normalize=false)
Definition: primitives_array.h:246
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec4f *member_offset)
Definition: primitives_array.h:444
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, Vec2us *member_offset, bool normalize=false)
Definition: primitives_array.h:336
void set_attributes(int index, VertexArrayVector< Vec2us > &buffer, bool normalize=false)
Definition: primitives_array.h:181
Definition: primitives_array.h:59
void set_attributes(int index, VertexArrayVector< Vec2ui > &buffer, bool normalize=false)
Definition: primitives_array.h:191
void set_attributes(int index, VertexArrayVector< float > &buffer)
Definition: primitives_array.h:166
Interface to drawing graphics.
Definition: graphic_context.h:256
VertexAttributeDataType
Primitives array description.
Definition: primitives_array.h:55
void set_attributes(int index, VertexArrayVector< unsigned int > &buffer, bool normalize=false)
Definition: primitives_array.h:156
void set_attributes(int index, VertexArrayVector< Vec4i > &buffer, bool normalize=false)
Definition: primitives_array.h:266
void set_attributes(int index, VertexArrayVector< signed char > &buffer, bool normalize=false)
Definition: primitives_array.h:141
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< signed int > &buffer, bool normalize=false)
Definition: primitives_array.h:161
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< Vec3s > &buffer, bool normalize=false)
Definition: primitives_array.h:221
void set_attributes(int index, VertexArrayVector< unsigned short > &buffer, bool normalize=false)
Definition: primitives_array.h:146
void set_attributes(int index, VertexArrayVector< Type > &buffer, signed short *member_offset, bool normalize=false)
Definition: primitives_array.h:300
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< Vec2s > &buffer, bool normalize=false)
Definition: primitives_array.h:186
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< Vec3f > &buffer)
Definition: primitives_array.h:236
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3i *member_offset, bool normalize=false)
Definition: primitives_array.h:396
3D vector
Definition: line_ray.h:46
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, Vec4s *member_offset, bool normalize=false)
Definition: primitives_array.h:426
void set_attributes(int index, VertexArrayVector< unsigned char > &buffer, int size, bool normalize=false)
Definition: primitives_array.h:101
Definition: primitives_array.h:60
Vertex Array Vector.
Definition: vertex_array_vector.h:42
void set_attributes(int index, VertexArrayVector< Type > &buffer, Vec3us *member_offset, bool normalize=false)
Definition: primitives_array.h:378
PrimitivesArray()
Construct a null instance.
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< Type > &buffer, Vec4ui *member_offset, bool normalize=false)
Definition: primitives_array.h:432