All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GlfArrayTexture Class Reference

Represents an array of texture objects in Glf. More...

+ Inheritance diagram for GlfArrayTexture:

Public Types

typedef GlfUVTexture Parent
 
typedef GlfArrayTexture This
 
- Public Types inherited from GlfTexture
typedef std::vector< BindingBindingVector
 
- Public Types inherited from TfRefBase
typedef void(* UniqueChangedFuncPtr )(TfRefBase const *, bool)
 

Public Member Functions

virtual GLF_API BindingVector GetBindings (TfToken const &identifier, GLuint samplerName)
 Returns the bindings to use this texture for the shader resource named identifier. More...
 
- Public Member Functions inherited from GlfUVTexture
int GetNumDimensions () const override
 Is this a 1-, 2- or 3-dimensional texture. More...
 
GLF_API VtDictionary GetTextureInfo (bool forceLoad) override
 
GLF_API bool IsMinFilterSupported (GLenum filter) override
 
- Public Member Functions inherited from GlfBaseTexture
GLF_API GLuint GetGlTextureName () override
 Returns the OpenGl texture name for the texture. More...
 
GLF_API int GetWidth ()
 
GLF_API int GetHeight ()
 
GLF_API int GetDepth ()
 
GLF_API int GetFormat ()
 
GLF_API BindingVector GetBindings (TfToken const &identifier, GLuint samplerName) override
 Returns the bindings to use this texture for the shader resource named identifier. More...
 
- Public Member Functions inherited from GlfTexture
GLF_API size_t GetMemoryUsed () const
 Amount of memory used to store the texture. More...
 
GLF_API size_t GetMemoryRequested () const
 Amount of memory the user wishes to allocate to the texture. More...
 
GLF_API void SetMemoryRequested (size_t targetMemory)
 Specify the amount of memory the user wishes to allocate to the texture. More...
 
virtual GLF_API bool IsMagFilterSupported (GLenum filter)
 
GLF_API size_t GetContentsID () const
 Returns an identifier that can be used to determine when the contents of this texture (i.e. More...
 
GLF_API
GlfImage::ImageOriginLocation 
GetOriginLocation () const
 
GLF_API bool IsOriginLowerLeft () const
 
- Public Member Functions inherited from TfRefBase
size_t GetCurrentCount () const
 Return the current reference count of this object. More...
 
bool IsUnique () const
 Return true if only one TfRefPtr points to this object. More...
 
const TfRefCountGetRefCount () const
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Static Public Member Functions

static GLF_API
GlfArrayTextureRefPtr 
New (TfTokenVector const &imageFilePaths, unsigned int arraySize, unsigned int cropTop=0, unsigned int cropBottom=0, unsigned int cropLeft=0, unsigned int cropRight=0, GlfImage::ImageOriginLocation originLocation=GlfImage::OriginUpperLeft)
 Creates a new texture instance for the image file at imageFilePath. More...
 
static GLF_API
GlfArrayTextureRefPtr 
New (std::vector< std::string > const &imageFilePaths, unsigned int arraySize, unsigned int cropTop=0, unsigned int cropBottom=0, unsigned int cropLeft=0, unsigned int cropRight=0, GlfImage::ImageOriginLocation originLocation=GlfImage::OriginUpperLeft)
 
static GLF_API bool IsSupportedImageFile (TfToken const &imageFilePath)
 
- Static Public Member Functions inherited from GlfUVTexture
static GLF_API GlfUVTextureRefPtr New (TfToken const &imageFilePath, unsigned int cropTop=0, unsigned int cropBottom=0, unsigned int cropLeft=0, unsigned int cropRight=0, GlfImage::ImageOriginLocation originLocation=GlfImage::OriginUpperLeft)
 Creates a new texture instance for the image file at imageFilePath. More...
 
static GLF_API GlfUVTextureRefPtr New (std::string const &imageFilePath, unsigned int cropTop=0, unsigned int cropBottom=0, unsigned int cropLeft=0, unsigned int cropRight=0, GlfImage::ImageOriginLocation originLocation=GlfImage::OriginUpperLeft)
 
static GLF_API bool IsSupportedImageFile (TfToken const &imageFilePath)
 Returns true if the file at imageFilePath is an image that can be used with this texture object. More...
 
static GLF_API bool IsSupportedImageFile (std::string const &imageFilePath)
 
- Static Public Member Functions inherited from GlfTexture
static GLF_API size_t GetTextureMemoryAllocated ()
 static reporting function More...
 
- Static Public Member Functions inherited from TfRefBase
static TF_API void SetUniqueChangedListener (UniqueChangedListener listener)
 

Protected Member Functions

GLF_API GlfArrayTexture (TfTokenVector const &imageFilePaths, unsigned int arraySize, unsigned int cropTop, unsigned int cropBottom, unsigned int cropLeft, unsigned int cropRight, GlfImage::ImageOriginLocation originLocation=GlfImage::OriginUpperLeft)
 
virtual GLF_API void _ReadTexture ()
 
GLF_API const TfToken_GetImageFilePath (size_t index) const
 
GLF_API void _CreateTexture (GlfBaseTextureDataConstRefPtrVector texDataVec, bool const generateMipmap)
 
- Protected Member Functions inherited from GlfUVTexture
GLF_API GlfUVTexture (TfToken const &imageFilePath, unsigned int cropTop, unsigned int cropBottom, unsigned int cropLeft, unsigned int cropRight, GlfImage::ImageOriginLocation originLocation=GlfImage::OriginUpperLeft)
 
GLF_API void _ReadTexture () override
 
virtual GLF_API bool _GenerateMipmap () const
 
GLF_API const TfToken_GetImageFilePath () const
 
unsigned int _GetCropTop () const
 
unsigned int _GetCropBottom () const
 
unsigned int _GetCropLeft () const
 
unsigned int _GetCropRight () const
 
- Protected Member Functions inherited from GlfBaseTexture
GLF_API GlfBaseTexture (GlfImage::ImageOriginLocation originLocation)
 
GLF_API void _OnMemoryRequestedDirty () overridefinal
 
void _ReadTextureIfNotLoaded ()
 
GLF_API void _UpdateTexture (GlfBaseTextureDataConstPtr texData)
 
GLF_API void _CreateTexture (GlfBaseTextureDataConstPtr texData, bool useMipmaps, int unpackCropTop=0, int unpackCropBottom=0, int unpackCropLeft=0, int unpackCropRight=0, int unpackCropFront=0, int unpackCropBack=0)
 
GLF_API void _SetLoaded ()
 
- Protected Member Functions inherited from GlfTexture
GLF_API GlfTexture (GlfImage::ImageOriginLocation originLocation)
 
GLF_API void _SetMemoryUsed (size_t size)
 
GLF_API void _UpdateContentsID ()
 
- Protected Member Functions inherited from TfWeakBase
TfRefPtr< Tf_Remnant > _Register () const
 
template<class T >
TfRefPtr< Tf_Remnant > _Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

Represents an array of texture objects in Glf.

An GlfArrayTexture is defined by a set of image file paths. Currently accepted image formats are png, jpg and bmp.

Definition at line 52 of file arrayTexture.h.

Member Function Documentation

virtual GLF_API BindingVector GetBindings ( TfToken const &  identifier,
GLuint  samplerId 
)
virtual

Returns the bindings to use this texture for the shader resource named identifier.

If samplerId is specified, the bindings returned will use this samplerId for resources which can be sampled.

Implements GlfTexture.

static GLF_API GlfArrayTextureRefPtr New ( TfTokenVector const &  imageFilePaths,
unsigned int  arraySize,
unsigned int  cropTop = 0,
unsigned int  cropBottom = 0,
unsigned int  cropLeft = 0,
unsigned int  cropRight = 0,
GlfImage::ImageOriginLocation  originLocation = GlfImage::OriginUpperLeft 
)
static

Creates a new texture instance for the image file at imageFilePath.

If given, cropTop, cropBottom, cropLeft, and cropRight specifies the number of pixels to crop from the indicated border of the source image.


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