OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreGLES2RenderTexture.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 __GLES2RenderTexture_H__
30 #define __GLES2RenderTexture_H__
31 
32 #include "OgreGLES2Texture.h"
33 
34 namespace Ogre {
35  class GLES2HardwarePixelBuffer;
36 
40  {
41  public:
45 
46  GLES2SurfaceDesc() :buffer(0), zoffset(0), numSamples(0) {}
47  };
48 
52  {
53  public:
54  GLES2RenderTexture(const String &name, const GLES2SurfaceDesc &target, bool writeGamma, uint fsaa);
55  virtual ~GLES2RenderTexture();
56  bool requiresTextureFlipping() const { return true; }
57  };
58 
61  class _OgreGLES2Export GLES2RTTManager : public Singleton<GLES2RTTManager>
62  {
63  public:
64  virtual ~GLES2RTTManager();
65 
68  virtual RenderTexture *createRenderTexture(const String &name, const GLES2SurfaceDesc &target, bool writeGamma, uint fsaa) = 0;
69 
72  virtual bool checkFormat(PixelFormat format) = 0;
73 
76  virtual void bind(RenderTarget *target) = 0;
77 
82  virtual void unbind(RenderTarget *target) = 0;
83 
84  virtual void getBestDepthStencil(GLenum internalFormat, GLenum *depthFormat, GLenum *stencilFormat)
85  {
86  *depthFormat = GL_NONE;
87  *stencilFormat = GL_NONE;
88  }
89 
92  virtual MultiRenderTarget* createMultiRenderTarget(const String & name);
93 
96  virtual PixelFormat getSupportedAlternative(PixelFormat format);
97  };
98 
101  class GLES2CopyingRTTManager;
103  {
104  public:
106  const String &name,
107  const GLES2SurfaceDesc &target,
108  bool writeGamma, uint fsaa);
109 
110  virtual void getCustomAttribute(const String& name, void* pData);
111  };
112 
117  {
118  public:
120  virtual ~GLES2CopyingRTTManager();
121 
124  virtual RenderTexture *createRenderTexture(const String &name, const GLES2SurfaceDesc &target, bool writeGamma, uint fsaa);
125 
128  virtual bool checkFormat(PixelFormat format);
129 
132  virtual void bind(RenderTarget *target);
133 
136  virtual void unbind(RenderTarget *target);
137  };
138 }
139 
140 #endif
A 'canvas' which can receive the results of a rendering operation.
unsigned int uint32
Definition: OgrePlatform.h:344
GL surface descriptor.
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:64
This class represents a RenderTarget that renders to a Texture.
#define _OgreGLES2Export
This class represents a render target that renders to multiple RenderTextures at once.
PixelFormat
The pixel format used for images, textures, and render surfaces.
virtual void getBestDepthStencil(GLenum internalFormat, GLenum *depthFormat, GLenum *stencilFormat)
GLES2HardwarePixelBuffer * buffer
#define GL_NONE
_StringBase String
Base class for GL Render Textures.
unsigned int uint
Manager/factory for RenderTextures.
Simple, copying manager/factory for RenderTextures.