Crazy Eddie's GUI System 0.8.7
Loading...
Searching...
No Matches
FBOTextureTarget.h
1/***********************************************************************
2 created: Sun Jan 11 2009
3 author: Paul D Turner
4*************************************************************************/
5/***************************************************************************
6 * Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining
9 * a copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sublicense, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be
17 * included in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 ***************************************************************************/
27#ifndef _CEGUIOpenGLESFBOTextureTarget_h_
28#define _CEGUIOpenGLESFBOTextureTarget_h_
29
30#include "CEGUI/RendererModules/OpenGLES/RenderTarget.h"
31#include "CEGUI/TextureTarget.h"
32#include "CEGUI/Rect.h"
33#include "CEGUI/RendererModules/OpenGLES/GLES.h"
34
35#if defined(_MSC_VER)
36# pragma warning(push)
37# pragma warning(disable : 4250)
38#endif
39
40// Start of CEGUI namespace section
41namespace CEGUI
42{
43class OpenGLESTexture;
44
46class OPENGLES_GUIRENDERER_API OpenGLESFBOTextureTarget :
47 public OpenGLESRenderTarget<TextureTarget>
48{
49public:
52
53 // overrides from OpenGLESRenderTarget
54 void activate();
55 void deactivate();
56 // implementation of RenderTarget interface
57 bool isImageryCache() const;
58 // implementation of TextureTarget interface
59 void clear();
61 void declareRenderSize(const Sizef& sz);
62 bool isRenderingInverted() const;
63
66
67protected:
69 static const float DEFAULT_SIZE;
70
77
79 GLint d_oldFbo;
83 GLuint d_texture;
87 static uint s_textureNumber;
88};
89
90} // End of CEGUI namespace section
91
92#if defined(_MSC_VER)
93# pragma warning(pop)
94#endif
95
96#endif // end of guard _CEGUIOpenGLESFBOTextureTarget_h_
OpenGLESFBOTextureTarget - allows rendering to an OpenGLES texture via FBO.
Definition FBOTextureTarget.h:48
bool isImageryCache() const
Return whether the RenderTarget is an implementation that caches actual rendered imagery.
void clear()
Clear the surface of the underlying texture.
void initialiseRenderTexture()
allocate and set up the texture used with the FBO.
bool isRenderingInverted() const
Return whether rendering done on the target texture is inverted in relation to regular textures.
String generateTextureName()
generate a texture name
GLint d_oldFbo
Saving fbo before activation.
Definition FBOTextureTarget.h:79
static const float DEFAULT_SIZE
default size of created texture objects
Definition FBOTextureTarget.h:69
OpenGLESTexture * d_CEGUITexture
we use this to wrap d_texture so it can be used by the core CEGUI lib.
Definition FBOTextureTarget.h:85
static uint s_textureNumber
static member var used to generate unique texture names.
Definition FBOTextureTarget.h:87
GLuint d_frameBuffer
Frame buffer object.
Definition FBOTextureTarget.h:81
void deactivate()
Deactivate the render target after having completed rendering.
Texture & getTexture() const
Return a pointer to the CEGUI::Texture that the TextureTarget is using.
void activate()
Activate the render target and put it in a state ready to be drawn to.
void declareRenderSize(const Sizef &sz)
Used to declare to the TextureTarget the largest size, in pixels, of the next set of incoming renderi...
GLuint d_texture
Associated OpenGLES texture ID.
Definition FBOTextureTarget.h:83
static void initializedFBOExtension()
initialize FBO extension functions pointers
void resizeRenderTexture()
resize the texture
Intermediate OpenGLES implementation of a RenderTarget.
Definition RendererModules/OpenGLES/RenderTarget.h:43
Renderer class to interface with OpenGLES.
Definition RendererModules/OpenGLES/Renderer.h:67
Texture implementation for the OpenGLESRenderer.
Definition RendererModules/OpenGLES/Texture.h:40
String class used within the GUI system.
Definition String.h:64
Abstract base class specifying the required interface for Texture objects.
Definition Texture.h:54
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1