Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/OgreMain/include/OgreRenderOperation.h @ 5

Last change on this file since 5 was 5, checked in by anonymous, 17 years ago

=hoffentlich gehts jetzt

File size: 3.0 KB
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-2006 Torus Knot Software Ltd
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
24You may alternatively use this source under the terms of a specific version of
25the OGRE Unrestricted License provided you have obtained such a license from
26Torus Knot Software Ltd.
27-----------------------------------------------------------------------------
28*/
29#ifndef _RenderOperation_H__
30#define _RenderOperation_H__
31
32#include "OgrePrerequisites.h"
33#include "OgreVertexIndexData.h"
34
35namespace Ogre {
36
37
38        /** 'New' rendering operation using vertex buffers. */
39        class _OgrePrivate RenderOperation {
40        public:
41                /// The rendering operation type to perform
42                enum OperationType {
43                        /// A list of points, 1 vertex per point
44            OT_POINT_LIST = 1,
45                        /// A list of lines, 2 vertices per line
46            OT_LINE_LIST = 2,
47                        /// A strip of connected lines, 1 vertex per line plus 1 start vertex
48            OT_LINE_STRIP = 3,
49                        /// A list of triangles, 3 vertices per triangle
50            OT_TRIANGLE_LIST = 4,
51                        /// A strip of triangles, 3 vertices for the first triangle, and 1 per triangle after that
52            OT_TRIANGLE_STRIP = 5,
53                        /// A fan of triangles, 3 vertices for the first triangle, and 1 per triangle after that
54            OT_TRIANGLE_FAN = 6
55        };
56
57                /// Vertex source data
58                VertexData *vertexData;
59
60                /// The type of operation to perform
61                OperationType operationType;
62
63                /** Specifies whether to use indexes to determine the vertices to use as input. If false, the vertices are
64                 simply read in sequence to define the primitives. If true, indexes are used instead to identify vertices
65                 anywhere in the buffer, and allowing vertices to be used more than once.
66                 If true, then the indexBuffer, indexStart and numIndexes properties must be valid. */
67                bool useIndexes;
68
69                /// Index data - only valid if useIndexes is true
70                IndexData *indexData;
71                /// Debug pointer back to renderable which created this
72                const Renderable* srcRenderable;
73
74
75        RenderOperation() :
76            vertexData(0), operationType(OT_TRIANGLE_LIST), useIndexes(true),
77                indexData(0) {}
78
79        };
80}
81
82
83
84#endif
Note: See TracBrowser for help on using the repository browser.