]> git.tdb.fi Git - libs/gl.git/blob - source/vertexformat.h
Move VertexFormat and VertexArrayBuilder to their own files
[libs/gl.git] / source / vertexformat.h
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 #ifndef MSP_GL_VERTEXFORMAT_H_
9 #define MSP_GL_VERTEXFORMAT_H_
10
11 #include <istream>
12 #include "types.h"
13
14 namespace Msp {
15 namespace GL {
16
17 enum VertexFormat
18 {
19         NODATA=0,
20         VERTEX2=1,
21         VERTEX3,
22         VERTEX4,
23         NORMAL3=6,
24         TEXCOORD1=8,
25         TEXCOORD2,
26         TEXCOORD3,
27         TEXCOORD4,
28         COLOR4_UBYTE=12,
29         COLOR3_FLOAT=14,
30         COLOR4_FLOAT,
31 };
32
33 inline VertexFormat operator,(VertexFormat a, VertexFormat b) { return VertexFormat(a<<4 | b); }
34 uint get_stride(VertexFormat);
35 std::istream &operator>>(std::istream &, VertexFormat &);
36
37 } // namespace GL
38 } // namespace Msp
39
40 #endif