hx3d  1
2D/3D Simple Game Framework
attribute.hpp
1 /*
2  Buffer attribute.
3  Copyright (C) 2015 Denis BOURGE
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18  USA
19 */
20 
21 #ifndef HX3D_GRAPHICS_BUFFERS_ATTRIBUTE
22 #define HX3D_GRAPHICS_BUFFERS_ATTRIBUTE
23 
24 #include "hx3d/graphics/gl.hpp"
25 
26 #include <string>
27 
28 namespace hx3d {
29 namespace graphics {
30 namespace buffers {
31 
35 class Attribute {
36 public:
37 
41  Attribute();
42 
50  Attribute(const std::string name, const GLenum type, const GLuint size);
51 
57  const std::string getName() const;
58 
64  const GLenum getType() const;
65 
71  const GLuint getSize() const;
72 
73 private:
75  std::string _name;
77  GLenum _type;
79  GLuint _size;
80 };
81 
82 } /* buffers */
83 } /* graphics */
84 } /* hx3d */
85 
86 #endif
const GLenum getType() const
Get the attribute type.
Definition: attribute.cpp:40
hx3d framework namespace
Definition: audio.hpp:26
OpenGL buffer attribute.
Definition: attribute.hpp:35
const GLuint getSize() const
Get the attribute size.
Definition: attribute.cpp:44
Attribute()
Construct an empty attribute.
Definition: attribute.cpp:27
const std::string getName() const
Get the attribute name.
Definition: attribute.cpp:36