3 Copyright 2007 Antoine Chavasse <a.chavasse@gmail.com>
5 This file is part of Fail.
7 Fail is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3
9 as published by the Free Software Foundation.
11 Fail is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "scenegraph/IndexBuffer16.h"
23 using namespace fail::scenegraph
;
25 IndexBuffer16::IndexBuffer16()
29 IndexBuffer16::IndexBuffer16( uint32_t Size_
) :
35 IndexBuffer16::IndexBuffer16( const Serialization_tag
& )
39 void IndexBuffer16::bind() const
41 // TODO: this is ugly, hackish, and ineffective (too lazy to use VBO right now, I'll do it later)
42 // but this is on the "let's wait to see how it works in
43 // long peaks before trying to figure a proper design" list.
45 ms_GLType
= GL_UNSIGNED_SHORT
;
46 ms_pIndexStart
= static_cast< const uint8_t* >(
47 static_cast< const void* >( &m_Indices
[ 0 ] ) );