OGRE  1.9.0
OgreShadowTextureManager.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2This source file is a part of OGRE
3(Object-oriented Graphics Rendering Engine)
4
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2014 Torus Knot Software Ltd
8Permission is hereby granted, free of charge, to any person obtaining a copy
9of this software and associated documentation files (the "Software"), to deal
10in the Software without restriction, including without limitation the rights
11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12copies of the Software, and to permit persons to whom the Software is
13furnished to do so, subject to the following conditions:
14
15The above copyright notice and this permission notice shall be included in
16all copies or substantial portions of the Software.
17
18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24THE SOFTWARE
25
26You may alternatively use this source under the terms of a specific version of
27the OGRE Unrestricted License provided you have obtained such a license from
28Torus Knot Software Ltd.
29-------------------------------------------------------------------------*/
30#ifndef __ShadowTextureManager_H__
31#define __ShadowTextureManager_H__
32
33// Precompiler options
34#include "OgrePrerequisites.h"
35#include "OgreSingleton.h"
36#include "OgrePixelFormat.h"
37#include "OgreTexture.h"
39#include "OgreHeaderPrefix.h"
40
41namespace Ogre
42{
50
53 {
54 unsigned int width;
55 unsigned int height;
57 unsigned int fsaa;
59
62 };
63
66
67 inline _OgreExport bool operator== ( const ShadowTextureConfig& lhs, const ShadowTextureConfig& rhs );
68 inline _OgreExport bool operator!= ( const ShadowTextureConfig& lhs, const ShadowTextureConfig& rhs );
69
70
81 class _OgreExport ShadowTextureManager : public Singleton<ShadowTextureManager>, public ShadowDataAlloc
82 {
83 protected:
86 size_t mCount;
87
88 public:
91
95 virtual void getShadowTextures(const ShadowTextureConfigList& config,
96 ShadowTextureList& listToPopulate);
97
102
108 virtual void clearUnused();
113 virtual void clear();
114
147
148 };
149
152}
153
154#include "OgreHeaderSuffix.h"
155
156#endif
157
#define _OgreExport
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Concrete IteratorWrapper for const access to the underlying container.
Class to manage the available shadow textures which may be shared between many SceneManager instances...
virtual TexturePtr getNullShadowTexture(PixelFormat format)
Get an appropriately defined 'null' texture, i.e.
static ShadowTextureManager * getSingletonPtr(void)
Override standard Singleton retrieval.
virtual void clear()
Dereference all the shadow textures kept in this class and remove them from TextureManager; note that...
static ShadowTextureManager & getSingleton(void)
Override standard Singleton retrieval.
virtual void clearUnused()
Remove any shadow textures that are no longer being referenced.
virtual void getShadowTextures(const ShadowTextureConfigList &config, ShadowTextureList &listToPopulate)
Populate an incoming list with shadow texture references as requested in the configuration list.
Template class for creating single-instance global classes.
PixelFormat
The pixel format used for images, textures, and render surfaces.
@ PF_X8R8G8B8
32-bit pixel format, 8 bits for red, 8 bits for green, 8 bits for blue like PF_A8R8G8B8,...
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
vector< ShadowTextureConfig >::type ShadowTextureConfigList
ConstVectorIterator< ShadowTextureConfigList > ConstShadowTextureConfigIterator
vector< TexturePtr >::type ShadowTextureList
unsigned short uint16
Structure containing the configuration for one shadow texture.
std::vector< T, A > type