OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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-2011 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 
64  size_t getWidth();
65  size_t getHeight();
66  PixelFormat getFormat();
67 
68  GLESFBOManager *getManager() { return mManager; }
69  const GLESSurfaceDesc &getSurface(size_t attachment) { return mColour[attachment]; }
70  private:
72  GLsizei mNumSamples;
73  GLuint mFB;
78  // Arbitrary number of texture surfaces
80 
81 
89  void initialise();
90  };
91 
92 }
93 
94 #endif
#define OGRE_MAX_MULTIPLE_RENDER_TARGETS
Define max number of multiple render targets (MRTs) to render to at once.
Definition: OgreConfig.h:119
GL surface descriptor.
const GLESSurfaceDesc & getSurface(size_t attachment)
#define _OgreGLESExport
Frame Buffer Object abstraction.
PixelFormat
The pixel format used for images, textures, and render surfaces.
Factory for GL Frame Buffer Objects, and related things.
unsigned int uint