Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Attributes | List of all members
Ogre::GLESTexture Class Reference

#include <OgreGLESTexture.h>

Inheritance diagram for Ogre::GLESTexture:
Inheritance graph
[legend]

Public Member Functions

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

Protected Types

typedef SharedPtr< std::vector< Image > > 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 std::vector< HardwarePixelBufferSharedPtrSurfaceList
 Vector of pointers to subsurfaces. More...
 

Private Attributes

GLESSupportmGLSupport
 
SurfaceList mSurfaceList
 
GLuint mTextureID
 

Detailed Description

Definition at line 42 of file OgreGLESTexture.h.

Member Typedef Documentation

◆ LoadedImages

typedef SharedPtr<std::vector<Image> > Ogre::GLESTexture::LoadedImages
protected

Used to hold images between calls to prepare and load.

Definition at line 84 of file OgreGLESTexture.h.

◆ SurfaceList

Vector of pointers to subsurfaces.

Definition at line 108 of file OgreGLESTexture.h.

Constructor & Destructor Documentation

◆ GLESTexture()

Ogre::GLESTexture::GLESTexture ( ResourceManager creator,
const String name,
ResourceHandle  handle,
const String group,
bool  isManual,
ManualResourceLoader loader,
GLESSupport support 
)

◆ ~GLESTexture()

virtual Ogre::GLESTexture::~GLESTexture ( )
virtual

Member Function Documentation

◆ _createGLTexResource()

void Ogre::GLESTexture::_createGLTexResource ( )
protected

Create gl texture.

◆ _createSurfaceList()

void Ogre::GLESTexture::_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

◆ createInternalResourcesImpl()

void Ogre::GLESTexture::createInternalResourcesImpl ( void  )
protected

Implementation of creating internal texture resources.

◆ createRenderTexture()

void Ogre::GLESTexture::createRenderTexture ( )

◆ freeInternalResourcesImpl()

void Ogre::GLESTexture::freeInternalResourcesImpl ( void  )
protected

Implementation of freeing internal texture resources.

◆ getBuffer()

HardwarePixelBufferSharedPtr Ogre::GLESTexture::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.

◆ getGLESTextureTarget()

GLenum Ogre::GLESTexture::getGLESTextureTarget ( void  ) const

◆ getGLID()

GLuint Ogre::GLESTexture::getGLID ( ) const

Definition at line 59 of file OgreGLESTexture.h.

◆ loadImpl()

void Ogre::GLESTexture::loadImpl ( void  )
protected

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

◆ notifyOnContextLost()

virtual void Ogre::GLESTexture::notifyOnContextLost ( )
protectedvirtual

◆ notifyOnContextReset()

virtual void Ogre::GLESTexture::notifyOnContextReset ( )
protectedvirtual

◆ prepareImpl()

void Ogre::GLESTexture::prepareImpl ( void  )
protected

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

◆ unprepareImpl()

void Ogre::GLESTexture::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

◆ mGLSupport

GLESSupport& Ogre::GLESTexture::mGLSupport
private

Definition at line 105 of file OgreGLESTexture.h.

◆ mLoadedImages

LoadedImages Ogre::GLESTexture::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 90 of file OgreGLESTexture.h.

◆ mSurfaceList

SurfaceList Ogre::GLESTexture::mSurfaceList
private

Definition at line 109 of file OgreGLESTexture.h.

◆ mTextureID

GLuint Ogre::GLESTexture::mTextureID
private

Definition at line 104 of file OgreGLESTexture.h.


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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Oct 22 2017 04:04:15