OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::GLES2Texture Class Reference

#include <OgreGLES2Texture.h>

+ Inheritance diagram for Ogre::GLES2Texture:
+ Collaboration diagram for Ogre::GLES2Texture:

Public Member Functions

 GLES2Texture (ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, GLES2Support &support)
 
virtual ~GLES2Texture ()
 
void createRenderTexture ()
 
HardwarePixelBufferSharedPtr getBuffer (size_t face, size_t mipmap)
 Return hardware pixel buffer for a surface. More...
 
void getCustomAttribute (const String &name, void *pData)
 
GLenum getGLES2TextureTarget (void) const
 
GLuint getGLID () const
 

Protected Types

typedef SharedPtr< vector
< Image >::type > 
LoadedImages
 Used to hold images between calls to prepare and load. More...
 

Protected Member Functions

void _createGLTexResource ()
 Create gl texture. More...
 
void _createSurfaceList ()
 Internal method, create GLHardwarePixelBuffers for every face and mipmap level. More...
 
void createInternalResourcesImpl (void)
 Implementation of creating internal texture resources. More...
 
void freeInternalResourcesImpl (void)
 Implementation of freeing internal texture resources. More...
 
void loadImpl (void)
 Internal implementation of the meat of the 'load' action, only called if this resource is not being loaded from a ManualResourceLoader. More...
 
virtual void notifyOnContextLost ()
 See AndroidResource. More...
 
virtual void notifyOnContextReset ()
 See AndroidResource. More...
 
void prepareImpl (void)
 Internal implementation of the meat of the 'prepare' action. More...
 
void unprepareImpl (void)
 Internal function for undoing the 'prepare' action. More...
 

Protected Attributes

LoadedImages mLoadedImages
 Vector of images that were pulled from disk by prepareLoad but have yet to be pushed into texture memory by loadImpl. More...
 

Private Types

typedef vector
< HardwarePixelBufferSharedPtr >
::type 
SurfaceList
 Vector of pointers to subsurfaces. More...
 

Private Attributes

GLES2SupportmGLSupport
 
SurfaceList mSurfaceList
 
GLuint mTextureID
 

Detailed Description

Definition at line 41 of file OgreGLES2Texture.h.

Member Typedef Documentation

Used to hold images between calls to prepare and load.

Definition at line 85 of file OgreGLES2Texture.h.

Vector of pointers to subsurfaces.

Definition at line 109 of file OgreGLES2Texture.h.

Constructor & Destructor Documentation

Ogre::GLES2Texture::GLES2Texture ( ResourceManager creator,
const String name,
ResourceHandle  handle,
const String group,
bool  isManual,
ManualResourceLoader loader,
GLES2Support support 
)
virtual Ogre::GLES2Texture::~GLES2Texture ( )
virtual

Member Function Documentation

void Ogre::GLES2Texture::_createGLTexResource ( )
protected

Create gl texture.

void Ogre::GLES2Texture::_createSurfaceList ( )
protected

Internal method, create GLHardwarePixelBuffers for every face and mipmap level.

This method must be called after the GL texture object was created, the number of mipmaps was set (GL_TEXTURE_MAX_LEVEL) and glTexImageXD was called to actually allocate the buffer

void Ogre::GLES2Texture::createInternalResourcesImpl ( void  )
protected

Implementation of creating internal texture resources.

void Ogre::GLES2Texture::createRenderTexture ( )
void Ogre::GLES2Texture::freeInternalResourcesImpl ( void  )
protected

Implementation of freeing internal texture resources.

HardwarePixelBufferSharedPtr Ogre::GLES2Texture::getBuffer ( size_t  face,
size_t  mipmap 
)

Return hardware pixel buffer for a surface.

This buffer can then be used to copy data from and to a particular level of the texture.

Parameters
faceFace number, in case of a cubemap texture. Must be 0 for other types of textures. For cubemaps, this is one of +X (0), -X (1), +Y (2), -Y (3), +Z (4), -Z (5)
mipmapMipmap level. This goes from 0 for the first, largest mipmap level to getNumMipmaps()-1 for the smallest.
Returns
A shared pointer to a hardware pixel buffer
Remarks
The buffer is invalidated when the resource is unloaded or destroyed. Do not use it after the lifetime of the containing texture.
void Ogre::GLES2Texture::getCustomAttribute ( const String name,
void *  pData 
)
GLenum Ogre::GLES2Texture::getGLES2TextureTarget ( void  ) const
GLuint Ogre::GLES2Texture::getGLID ( ) const
inline

Definition at line 58 of file OgreGLES2Texture.h.

void Ogre::GLES2Texture::loadImpl ( void  )
protected

Internal implementation of the meat of the 'load' action, only called if this resource is not being loaded from a ManualResourceLoader.

virtual void Ogre::GLES2Texture::notifyOnContextLost ( )
protectedvirtual
virtual void Ogre::GLES2Texture::notifyOnContextReset ( )
protectedvirtual
void Ogre::GLES2Texture::prepareImpl ( void  )
protected

Internal implementation of the meat of the 'prepare' action.

void Ogre::GLES2Texture::unprepareImpl ( void  )
protected

Internal function for undoing the 'prepare' action.

Called when the load is completed, and when resources are unloaded when they are prepared but not yet loaded.

Member Data Documentation

GLES2Support& Ogre::GLES2Texture::mGLSupport
private

Definition at line 106 of file OgreGLES2Texture.h.

LoadedImages Ogre::GLES2Texture::mLoadedImages
protected

Vector of images that were pulled from disk by prepareLoad but have yet to be pushed into texture memory by loadImpl.

Images should be deleted by loadImpl and unprepareImpl.

Definition at line 91 of file OgreGLES2Texture.h.

SurfaceList Ogre::GLES2Texture::mSurfaceList
private

Definition at line 110 of file OgreGLES2Texture.h.

GLuint Ogre::GLES2Texture::mTextureID
private

Definition at line 105 of file OgreGLES2Texture.h.


The documentation for this class was generated from the following file: