"Initial commit to Gerrit"
[profile/ivi/cogl.git] / cogl / cogl-primitive-private.h
1 /*
2  * Cogl
3  *
4  * An object oriented GL/GLES Abstraction/Utility Layer
5  *
6  * Copyright (C) 2010 Intel Corporation.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library. If not, see
20  * <http://www.gnu.org/licenses/>.
21  *
22  *
23  *
24  * Authors:
25  *   Robert Bragg <robert@linux.intel.com>
26  */
27
28 #ifndef __COGL_PRIMITIVE_PRIVATE_H
29 #define __COGL_PRIMITIVE_PRIVATE_H
30
31 #include "cogl-object-private.h"
32 #include "cogl-attribute-buffer-private.h"
33 #include "cogl-attribute-private.h"
34
35 struct _CoglPrimitive
36 {
37   CoglObject _parent;
38
39   CoglVerticesMode mode;
40   int first_vertex;
41   int n_vertices;
42   CoglIndices *indices;
43
44   int immutable_ref;
45
46   CoglAttribute **attributes;
47   int n_attributes;
48
49   int n_embedded_attributes;
50   CoglAttribute *embedded_attribute;
51 };
52
53 CoglPrimitive *
54 _cogl_primitive_immutable_ref (CoglPrimitive *primitive);
55
56 void
57 _cogl_primitive_immutable_unref (CoglPrimitive *primitive);
58
59 void
60 _cogl_primitive_draw (CoglPrimitive *primitive,
61                       CoglDrawFlags flags);
62
63 #endif /* __COGL_PRIMITIVE_PRIVATE_H */
64