OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreGL3PlusRenderTexture.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 __GL3PlusRENDERTEXTURE_H__
30 #define __GL3PlusRENDERTEXTURE_H__
31 
32 #include "OgreGL3PlusTexture.h"
33 
34 namespace Ogre {
35  class GL3PlusHardwarePixelBuffer;
36 
40  {
41  public:
45 
46  GL3PlusSurfaceDesc() :buffer(0), zoffset(0), numSamples(0) {}
47  };
48 
52  {
53  public:
54  GL3PlusRenderTexture(const String &name, const GL3PlusSurfaceDesc &target, bool writeGamma, uint fsaa);
55  virtual ~GL3PlusRenderTexture();
56  bool requiresTextureFlipping() const { return true; }
57 
61  };
62 
65  class _OgreGL3PlusExport GL3PlusRTTManager : public Singleton<GL3PlusRTTManager>
66  {
67  public:
68  virtual ~GL3PlusRTTManager();
69 
72  virtual RenderTexture *createRenderTexture(const String &name, const GL3PlusSurfaceDesc &target, bool writeGamma, uint fsaa) = 0;
73 
76  virtual bool checkFormat(PixelFormat format) = 0;
77 
80  virtual void bind(RenderTarget *target) = 0;
81 
86  virtual void unbind(RenderTarget *target) = 0;
87 
88  virtual void getBestDepthStencil(GLenum internalFormat, GLenum *depthFormat, GLenum *stencilFormat)
89  {
90  *depthFormat = GL_NONE;
91  *stencilFormat = GL_NONE;
92  }
93 
96  virtual MultiRenderTarget* createMultiRenderTarget(const String & name);
97 
100  virtual PixelFormat getSupportedAlternative(PixelFormat format);
101  };
102 
103 }
104 
105 #endif
A 'canvas' which can receive the results of a rendering operation.
unsigned int uint32
Definition: OgrePlatform.h:420
virtual void getBestDepthStencil(GLenum internalFormat, GLenum *depthFormat, GLenum *stencilFormat)
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:64
This class represents a RenderTarget that renders to a Texture.
This class represents a render target that renders to multiple RenderTextures at once.
PixelFormat
The pixel format used for images, textures, and render surfaces.
#define _OgrePrivate
Definition: OgrePlatform.h:256
GL3PlusHardwarePixelBuffer * buffer
Manager/factory for RenderTextures.
Base class for GL Render Textures.
#define _OgreGL3PlusExport
static const String CustomAttributeString_TARGET
#define GL_NONE
static const String CustomAttributeString_FBO
static const String CustomAttributeString_GLCONTEXT
_StringBase String
Definition: OgreCommon.h:53
unsigned int uint