Visualization Library 2.0.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
IVertexAttribSet.hpp
Go to the documentation of this file.
1 /**************************************************************************************/
2 /* */
3 /* Visualization Library */
4 /* http://visualizationlibrary.org */
5 /* */
6 /* Copyright (c) 2005-2020, Michele Bosi */
7 /* All rights reserved. */
8 /* */
9 /* Redistribution and use in source and binary forms, with or without modification, */
10 /* are permitted provided that the following conditions are met: */
11 /* */
12 /* - Redistributions of source code must retain the above copyright notice, this */
13 /* list of conditions and the following disclaimer. */
14 /* */
15 /* - Redistributions in binary form must reproduce the above copyright notice, this */
16 /* list of conditions and the following disclaimer in the documentation and/or */
17 /* other materials provided with the distribution. */
18 /* */
19 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */
20 /* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED */
21 /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
22 /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR */
23 /* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
24 /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */
25 /* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
26 /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
27 /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
28 /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
29 /* */
30 /**************************************************************************************/
31 
32 #ifndef IVertexAttribSet_INCLUDE_ONCE
33 #define IVertexAttribSet_INCLUDE_ONCE
34 
35 #include <vlGraphics/Array.hpp>
36 #include <vlCore/Collection.hpp>
37 
38 namespace vl
39 {
40  //------------------------------------------------------------------------------
41  // IVertexAttribSet
42  //------------------------------------------------------------------------------
45  {
46  public:
48  virtual void setVertexArray(ArrayAbstract* data) = 0;
50  virtual const ArrayAbstract* vertexArray() const = 0;
52  virtual ArrayAbstract* vertexArray() = 0;
53 
55  virtual void setNormalArray(ArrayAbstract* data) = 0;
57  virtual const ArrayAbstract* normalArray() const = 0;
59  virtual ArrayAbstract* normalArray() = 0;
60 
62  virtual void setColorArray(ArrayAbstract* data) = 0;
64  virtual const ArrayAbstract* colorArray() const = 0;
66  virtual ArrayAbstract* colorArray() = 0;
67 
69  virtual void setSecondaryColorArray(ArrayAbstract* data) = 0;
71  virtual const ArrayAbstract* secondaryColorArray() const = 0;
73  virtual ArrayAbstract* secondaryColorArray() = 0;
74 
76  virtual void setFogCoordArray(ArrayAbstract* data) = 0;
78  virtual const ArrayAbstract* fogCoordArray() const = 0;
80  virtual ArrayAbstract* fogCoordArray() = 0;
81 
83  virtual void setTexCoordArray(int tex_unit, ArrayAbstract* data) = 0;
85  virtual const ArrayAbstract* texCoordArray(int tex_unit) const = 0;
87  virtual ArrayAbstract* texCoordArray(int tex_unit) = 0;
88 
90  virtual void setVertexAttribArray(int attrib_location, const ArrayAbstract* info) = 0;
92  virtual const ArrayAbstract* vertexAttribArray(int attrib_location) const = 0;
94  virtual ArrayAbstract* vertexAttribArray(int attrib_location) = 0;
95  };
96 }
97 
98 #endif
virtual const ArrayAbstract * vertexArray() const =0
Conventional vertex array.
The ArrayAbstract class defines an abstract interface to conveniently manipulate data stored in a Buf...
Definition: Array.hpp:58
Abstract interface to manipulate OpenGL&#39;s vertex attribute arrays.
virtual const ArrayAbstract * normalArray() const =0
Conventional normal array.
virtual const ArrayAbstract * texCoordArray(int tex_unit) const =0
Conventional texture coords arrays.
virtual void setColorArray(ArrayAbstract *data)=0
Conventional color array.
virtual void setTexCoordArray(int tex_unit, ArrayAbstract *data)=0
Conventional texture coords arrays.
virtual void setVertexArray(ArrayAbstract *data)=0
Conventional vertex array.
Visualization Library main namespace.
virtual const ArrayAbstract * secondaryColorArray() const =0
Conventional secondary color array.
virtual const ArrayAbstract * vertexAttribArray(int attrib_location) const =0
Returns a generic vertex attribute&#39;s info.
virtual const ArrayAbstract * fogCoordArray() const =0
Conventional fog array.
virtual void setNormalArray(ArrayAbstract *data)=0
Conventional normal array.
virtual void setFogCoordArray(ArrayAbstract *data)=0
Conventional fog array.
virtual void setVertexAttribArray(int attrib_location, const ArrayAbstract *info)=0
Binds a generic vertex attribute.
virtual void setSecondaryColorArray(ArrayAbstract *data)=0
Conventional secondary color array.
virtual const ArrayAbstract * colorArray() const =0
Conventional color array.