source: GTP/trunk/Lib/Geom/OgreStuff/include/OgreRenderOperation.h @ 1809

Revision 1809, 2.9 KB checked in by gumbau, 18 years ago (diff)
Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2005 The OGRE Team
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23-----------------------------------------------------------------------------
24*/
25#ifndef _RenderOperation_H__
26#define _RenderOperation_H__
27
28#include "OgrePrerequisites.h"
29#include "OgreVertexIndexData.h"
30
31namespace Ogre {
32
33
34        /** 'New' rendering operation using vertex buffers. */
35        class _OgrePrivate RenderOperation {
36        public:
37                /// The rendering operation type to perform
38                enum OperationType {
39                        /// A list of points, 1 vertex per point
40            OT_POINT_LIST = 1,
41                        /// A list of lines, 2 vertices per line
42            OT_LINE_LIST = 2,
43                        /// A strip of connected lines, 1 vertex per line plus 1 start vertex
44            OT_LINE_STRIP = 3,
45                        /// A list of triangles, 3 vertices per triangle
46            OT_TRIANGLE_LIST = 4,
47                        /// A strip of triangles, 3 vertices for the first triangle, and 1 per triangle after that
48            OT_TRIANGLE_STRIP = 5,
49                        /// A fan of triangles, 3 vertices for the first triangle, and 1 per triangle after that
50            OT_TRIANGLE_FAN = 6
51        };
52
53                /// Vertex source data
54                VertexData *vertexData;
55
56                /// The type of operation to perform
57                OperationType operationType;
58
59                /** Specifies whether to use indexes to determine the vertices to use as input. If false, the vertices are
60                 simply read in sequence to define the primitives. If true, indexes are used instead to identify vertices
61                 anywhere in the buffer, and allowing vertices to be used more than once.
62                 If true, then the indexBuffer, indexStart and numIndexes properties must be valid. */
63                bool useIndexes;
64
65                /// Index data - only valid if useIndexes is true
66                IndexData *indexData;
67                /// Debug pointer back to renderable which created this
68                const Renderable* srcRenderable;
69
70
71        RenderOperation() :
72            vertexData(0), operationType(OT_TRIANGLE_LIST), useIndexes(true),
73                indexData(0) {}
74
75        };
76}
77
78
79
80#endif
Note: See TracBrowser for help on using the repository browser.