HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GlfTexture Class Referenceabstract

#include <texture.h>

+ Inheritance diagram for GlfTexture:

Classes

class  Binding
 

Public Types

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

Public Member Functions

virtual GLF_API ~GlfTexture ()=0
 
 GlfTexture (const GlfTexture &)=delete
 
GlfTextureoperator= (const GlfTexture &)=delete
 
virtual BindingVector GetBindings (TfToken const &identifier, GLuint samplerId=0)=0
 
virtual GLuint GetGlTextureName ()=0
 Returns the OpenGl texture name for the texture. More...
 
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 VtDictionary GetTextureInfo (bool forceLoad)=0
 
virtual GLF_API bool IsMinFilterSupported (GLenum filter)
 
virtual GLF_API bool IsMagFilterSupported (GLenum filter)
 
GLF_API size_t GetContentsID () const
 
GLF_API
HioImage::ImageOriginLocation 
GetOriginLocation () const
 
GLF_API bool IsOriginLowerLeft () const
 
- Public Member Functions inherited from TfRefBase
 TfRefBase ()
 
 TfRefBase (TfRefBase const &)
 
TfRefBaseoperator= (TfRefBase const &)
 
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...
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 
- Public Member Functions inherited from TfWeakBase
 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 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 GlfTexture ()
 
GLF_API GlfTexture (HioImage::ImageOriginLocation originLocation)
 
GLF_API void _SetMemoryUsed (size_t size)
 
virtual GLF_API void _OnMemoryRequestedDirty ()
 
GLF_API void _UpdateContentsID ()
 
- Protected Member Functions inherited from TfRefBase
virtual TF_API ~TfRefBase ()
 
- Protected Member Functions inherited from TfWeakBase
 ~TfWeakBase ()
 
TfRefPtr< Tf_Remnant_Register () const
 
template<class T >
TfRefPtr< Tf_Remnant_Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

Represents a texture object in Glf.

A texture is typically defined by reading texture image data from an image file but a texture might also represent an attachment of a draw target.

Definition at line 62 of file texture.h.

Member Typedef Documentation

typedef std::vector<Binding> GlfTexture::BindingVector

Definition at line 88 of file texture.h.

Constructor & Destructor Documentation

virtual GLF_API GlfTexture::~GlfTexture ( )
pure virtual
GlfTexture::GlfTexture ( const GlfTexture )
delete
GLF_API GlfTexture::GlfTexture ( )
protected
GLF_API GlfTexture::GlfTexture ( HioImage::ImageOriginLocation  originLocation)
protected

Member Function Documentation

virtual GLF_API void GlfTexture::_OnMemoryRequestedDirty ( )
protectedvirtual
GLF_API void GlfTexture::_SetMemoryUsed ( size_t  size)
protected
GLF_API void GlfTexture::_UpdateContentsID ( )
protected
virtual BindingVector GlfTexture::GetBindings ( TfToken const &  identifier,
GLuint  samplerId = 0 
)
pure 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.

Implemented in GlfDrawTarget::Attachment.

GLF_API size_t GlfTexture::GetContentsID ( ) const

Returns an identifier that can be used to determine when the contents of this texture (i.e. its image data) has changed.

The contents of most textures will be immutable for the lifetime of the texture. However, the contents of the texture attachments of a draw target change when the draw target is updated.

virtual GLuint GlfTexture::GetGlTextureName ( )
pure virtual

Returns the OpenGl texture name for the texture.

Implemented in GlfDrawTarget::Attachment.

GLF_API size_t GlfTexture::GetMemoryRequested ( ) const

Amount of memory the user wishes to allocate to the texture.

GLF_API size_t GlfTexture::GetMemoryUsed ( ) const

Amount of memory used to store the texture.

GLF_API HioImage::ImageOriginLocation GlfTexture::GetOriginLocation ( ) const
virtual VtDictionary GlfTexture::GetTextureInfo ( bool  forceLoad)
pure virtual

Implemented in GlfDrawTarget::Attachment.

static GLF_API size_t GlfTexture::GetTextureMemoryAllocated ( )
static

static reporting function

virtual GLF_API bool GlfTexture::IsMagFilterSupported ( GLenum  filter)
virtual
virtual GLF_API bool GlfTexture::IsMinFilterSupported ( GLenum  filter)
virtual
GLF_API bool GlfTexture::IsOriginLowerLeft ( ) const
GlfTexture& GlfTexture::operator= ( const GlfTexture )
delete
GLF_API void GlfTexture::SetMemoryRequested ( size_t  targetMemory)

Specify the amount of memory the user wishes to allocate to the texture.


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