source: OGRE/trunk/ogrenew/RenderSystems/Direct3D9/include/OgreD3D9VertexDeclaration.h @ 692

Revision 692, 2.8 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

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 __D3D9VERTEXDECLARATION_H__
26#define __D3D9VERTEXDECLARATION_H__
27
28#include "OgreD3D9Prerequisites.h"
29#include "OgreHardwareVertexBuffer.h"
30
31namespace Ogre {
32
33    /** Specialisation of VertexDeclaration for D3D9 */
34    class D3D9VertexDeclaration : public VertexDeclaration
35    {
36    protected:
37        LPDIRECT3DDEVICE9 mlpD3DDevice;
38        LPDIRECT3DVERTEXDECLARATION9 mlpD3DDecl;
39        bool mNeedsRebuild;
40    public:
41        D3D9VertexDeclaration(LPDIRECT3DDEVICE9 device);
42        ~D3D9VertexDeclaration();
43       
44        /** See VertexDeclaration */
45        const VertexElement& addElement(unsigned short source, size_t offset, VertexElementType theType,
46            VertexElementSemantic semantic, unsigned short index = 0);
47
48        /** See VertexDeclaration */
49        const VertexElement& insertElement(unsigned short atPosition,
50            unsigned short source, size_t offset, VertexElementType theType,
51            VertexElementSemantic semantic, unsigned short index = 0);
52
53        /** See VertexDeclaration */
54        void removeElement(unsigned short elem_index);
55               
56                /** See VertexDeclaration */
57                void removeElement(VertexElementSemantic semantic, unsigned short index = 0);
58
59                /** See VertexDeclaration */
60                void removeAllElements(void);
61
62
63        /** See VertexDeclaration */
64        void modifyElement(unsigned short elem_index, unsigned short source, size_t offset, VertexElementType theType,
65            VertexElementSemantic semantic, unsigned short index = 0);
66
67        /** Gets the D3D9-specific vertex declaration. */
68        LPDIRECT3DVERTEXDECLARATION9 getD3DVertexDeclaration(void);
69
70
71    };
72
73}
74
75#endif
Note: See TracBrowser for help on using the repository browser.