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