OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreGLESFrameBufferObject.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 #ifndef __OgreGLESFBO_H__
29 #define __OgreGLESFBO_H__
30 
31 #include "OgreGLESRenderTexture.h"
32 #include "OgreGLESContext.h"
33 
34 namespace Ogre {
35 
36  class GLESFBOManager;
37  struct GLESSurfaceDesc;
38 
42  {
43  public:
46 
50  void bindSurface(size_t attachment, const GLESSurfaceDesc &target);
53  void unbindSurface(size_t attachment);
54 
57  void bind();
58 
61  void swapBuffers();
62 
68  void attachDepthBuffer( DepthBuffer *depthBuffer );
69  void detachDepthBuffer();
70 
72  uint32 getWidth();
73  uint32 getHeight();
74  PixelFormat getFormat();
75  GLsizei getFSAA();
76 
77  GLESFBOManager *getManager() { return mManager; }
78  const GLESSurfaceDesc &getSurface(size_t attachment) { return mColour[attachment]; }
79 
80 #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
81 
82  void notifyOnContextLost();
83 
85  void notifyOnContextReset(const GLESSurfaceDesc &target);
86 #endif
87 
88  private:
90  GLsizei mNumSamples;
91  GLuint mFB;
96  // Arbitrary number of texture surfaces
98 
99 
107  void initialise();
108  };
109 
110 }
111 
112 #endif
#define OGRE_MAX_MULTIPLE_RENDER_TARGETS
Define max number of multiple render targets (MRTs) to render to at once.
Definition: OgreConfig.h:117
unsigned int uint32
Definition: OgrePlatform.h:420
GL surface descriptor.
const GLESSurfaceDesc & getSurface(size_t attachment)
#define _OgreGLESExport
Frame Buffer Object abstraction.
An abstract class that contains a depth/stencil buffer.
PixelFormat
The pixel format used for images, textures, and render surfaces.
Factory for GL Frame Buffer Objects, and related things.
unsigned int uint