OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreGLES2HardwareBufferManager.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __GLES2HardwareBufferManager_H__
30 #define __GLES2HardwareBufferManager_H__
31 
32 #include "OgreGLES2Prerequisites.h"
34 
35 namespace Ogre {
36  class GLES2StateCacheManager;
37 
40  {
41  protected:
44  VertexDeclaration* createVertexDeclarationImpl(void);
46  void destroyVertexDeclarationImpl(VertexDeclaration* decl);
47 
48  public:
52  HardwareVertexBufferSharedPtr createVertexBuffer(size_t vertexSize,
53  size_t numVerts, HardwareBuffer::Usage usage, bool useShadowBuffer = false);
55  HardwareIndexBufferSharedPtr createIndexBuffer(
56  HardwareIndexBuffer::IndexType itype, size_t numIndexes,
57  HardwareBuffer::Usage usage, bool useShadowBuffer = false);
59  RenderToVertexBufferSharedPtr createRenderToVertexBuffer();
61  createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name = "");
63  HardwareUniformBufferSharedPtr createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage,
64  bool useShadowBuffer, size_t binding, const String& name = "");
65  HardwareCounterBufferSharedPtr createCounterBuffer(size_t sizeBytes,
67  bool useShadowBuffer = false, const String& name = "");
68 
70  static GLenum getGLUsage(unsigned int usage);
71 
73  static GLenum getGLType(unsigned int type);
74 
75  GLES2StateCacheManager * getStateCacheManager() { return mStateCacheManager; }
76  };
77 
80  {
81  public:
84  {
85 
86  }
88  {
89  OGRE_DELETE mImpl;
90  }
91 
93  static GLenum getGLUsage(unsigned int usage)
95 
97  static GLenum getGLType(unsigned int type)
99  };
100 
101 }
102 
103 #endif
Singleton wrapper for hardware buffer manager.
Shared pointer implementation used to share uniform buffers.
#define _OgreGLES2Export
Shared pointer implementation used to share vertex buffers.
Combination of HBU_DYNAMIC, HBU_WRITE_ONLY and HBU_DISCARDABLE.
GLES2HardwareBufferManagerBase as a Singleton.
An in memory cache of the OpenGL ES state.
Shared pointer implementation used to share index buffers.
static GLenum getGLType(unsigned int type)
Utility function to get the correct GL type based on VET's.
static GLenum getGLUsage(unsigned int usage)
Utility function to get the correct GL usage based on HBU's.
Base definition of a hardware buffer manager.
Usage
Enums describing buffer usage; not mutually exclusive.
#define OGRE_DELETE
static GLenum getGLUsage(unsigned int usage)
Utility function to get the correct GL usage based on HBU's.
Implementation of HardwareBufferManager for OpenGL ES.
This class declares the format of a set of vertex inputs, which can be issued to the rendering API th...
#define OGRE_NEW
Shared pointer implementation used to share counter buffers.
static GLenum getGLType(unsigned int type)
Utility function to get the correct GL type based on VET's.
Reference-counted shared pointer, used for objects where implicit destruction is required.
_StringBase String
Definition: OgreCommon.h:53