]> git.tdb.fi Git - libs/gl.git/blob - source/immediate.cpp
Make the use of DevIL optional
[libs/gl.git] / source / immediate.cpp
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #include "immediate.h"
9
10 namespace Msp {
11 namespace GL {
12
13 Immediate::Immediate(VertexFormat f):
14         PrimitiveBuilder(array),
15         array(f)
16 { }
17
18 void Immediate::end_()
19 {
20         array.apply();
21         glDrawArrays(type, 0, array.size());
22
23         array.clear();
24 }
25
26 } // namespace GL
27 } // namespace Msp