OgreShadowTextureManager.h
Go to the documentation of this file.
/*-------------------------------------------------------------------------
This source file is a part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE
You may alternatively use this source under the terms of a specific version of
the OGRE Unrestricted License provided you have obtained such a license from
Torus Knot Software Ltd.
-------------------------------------------------------------------------*/
#ifndef __ShadowTextureManager_H__
#define __ShadowTextureManager_H__
// Precompiler options
#include "OgrePrerequisites.h"
#include "OgreSingleton.h"
#include "OgrePixelFormat.h"
#include "OgreTexture.h"
#include "OgreIteratorWrappers.h"
#include "OgreHeaderPrefix.h"
namespace Ogre
{
typedef vector<TexturePtr>::type ShadowTextureList;
struct ShadowTextureConfig
{
unsigned int width;
unsigned int height;
PixelFormat format;
unsigned int fsaa;
uint16 depthBufferPoolId;
ShadowTextureConfig()
: width(512), height(512), format(PF_X8R8G8B8), fsaa(0), depthBufferPoolId(1) {}
};
typedef vector<ShadowTextureConfig>::type ShadowTextureConfigList;
typedef ConstVectorIterator<ShadowTextureConfigList> ConstShadowTextureConfigIterator;
inline _OgreExport bool operator== ( const ShadowTextureConfig& lhs, const ShadowTextureConfig& rhs );
inline _OgreExport bool operator!= ( const ShadowTextureConfig& lhs, const ShadowTextureConfig& rhs );
class _OgreExport ShadowTextureManager : public Singleton<ShadowTextureManager>, public ShadowDataAlloc
{
protected:
ShadowTextureList mTextureList;
ShadowTextureList mNullTextureList;
size_t mCount;
public:
ShadowTextureManager();
virtual ~ShadowTextureManager();
virtual void getShadowTextures(const ShadowTextureConfigList& config,
ShadowTextureList& listToPopulate);
virtual TexturePtr getNullShadowTexture(PixelFormat format);
virtual void clearUnused();
virtual void clear();
static ShadowTextureManager& getSingleton(void);
static ShadowTextureManager* getSingletonPtr(void);
};
}
#include "OgreHeaderSuffix.h"
#endif
Ogre::ShadowTextureConfig::height
unsigned int height
Definition: OgreShadowTextureManager.h:55
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::ShadowTextureConfig::width
unsigned int width
Definition: OgreShadowTextureManager.h:54
OgrePixelFormat.h
Ogre::ConstShadowTextureConfigIterator
ConstVectorIterator< ShadowTextureConfigList > ConstShadowTextureConfigIterator
Definition: OgreShadowTextureManager.h:65
Ogre::PF_X8R8G8B8
32-bit pixel format, 8 bits for red, 8 bits for green, 8 bits for blue like PF_A8R8G8B8, but alpha will get discarded
Definition: OgrePixelFormat.h:84
Ogre::PixelFormat
PixelFormat
The pixel format used for images, textures, and render surfaces.
Definition: OgrePixelFormat.h:43
Ogre::ShadowTextureConfig
Structure containing the configuration for one shadow texture.
Definition: OgreShadowTextureManager.h:52
Ogre::ShadowTextureManager::mNullTextureList
ShadowTextureList mNullTextureList
Definition: OgreShadowTextureManager.h:85
Ogre::ShadowTextureManager::mTextureList
ShadowTextureList mTextureList
Definition: OgreShadowTextureManager.h:84
Ogre::ShadowTextureConfig::fsaa
unsigned int fsaa
Definition: OgreShadowTextureManager.h:57
OgreSingleton.h
Ogre::ShadowTextureConfig::depthBufferPoolId
uint16 depthBufferPoolId
Definition: OgreShadowTextureManager.h:58
OgrePrerequisites.h
OgreTexture.h
Ogre::ShadowTextureConfig::format
PixelFormat format
Definition: OgreShadowTextureManager.h:56
Ogre::operator!=
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
Definition: OgreMemorySTLAllocator.h:202
Ogre::ShadowTextureManager::mCount
size_t mCount
Definition: OgreShadowTextureManager.h:86
Ogre::ShadowTextureManager
Class to manage the available shadow textures which may be shared between many SceneManager instances...
Definition: OgreShadowTextureManager.h:81
OgreHeaderSuffix.h
OgreIteratorWrappers.h
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::ShadowTextureConfig::ShadowTextureConfig
ShadowTextureConfig()
Definition: OgreShadowTextureManager.h:60
Ogre::SharedPtr< Texture >
Ogre::ConstVectorIterator
Concrete IteratorWrapper for const access to the underlying container.
Definition: OgreIteratorWrapper.h:217
Ogre::vector
Definition: OgrePrerequisites.h:491
OgreHeaderPrefix.h
Ogre::operator==
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
Definition: OgreMemorySTLAllocator.h:184
Ogre::ShadowTextureConfigList
vector< ShadowTextureConfig >::type ShadowTextureConfigList
Definition: OgreShadowTextureManager.h:64
Ogre::Singleton
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:64
Ogre::ShadowTextureList
vector< TexturePtr >::type ShadowTextureList
Definition: OgreShadowTextureManager.h:49
Ogre::uint16
unsigned short uint16
Definition: OgrePlatform.h:360
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.