hx3d  1
2D/3D Simple Game Framework
index_array_buffer.hpp
1 /*
2  Index array buffer.
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_INDEXARRAYBUFFER
22 #define HX3D_GRAPHICS_BUFFERS_INDEXARRAYBUFFER
23 
24 #include "hx3d/graphics/buffers/array_buffer.hpp"
25 
26 namespace hx3d {
27 namespace graphics {
28 namespace buffers {
29 
33 class IndexArrayBuffer: public ArrayBuffer<GLushort> {
34 
35 public:
41 
47  IndexArrayBuffer(const std::vector<GLushort> values);
48 
49  virtual void upload() override;
50  virtual void begin(const Ptr<Shader>& shader) override;
51  virtual void end(const Ptr<Shader>& shader) override;
52 };
53 
54 } /* buffers */
55 } /* graphics */
56 } /* hx3d */
57 
58 #endif
hx3d framework namespace
Definition: audio.hpp:26
virtual void begin(const Ptr< Shader > &shader) override
Begin the use with a shader.
virtual void upload() override
Upload the data to the GPU.
IndexArrayBuffer()
Build an empty index buffer.
virtual void end(const Ptr< Shader > &shader) override
End the use with a shader.
std::shared_ptr< T > Ptr
Quick-typing shared ptr.
Definition: ptr.hpp:34
OpenGL GPU uploadable buffer.