24 #ifndef PXR_IMAGING_GLF_TEXTURE_H
25 #define PXR_IMAGING_GLF_TEXTURE_H
30 #include "pxr/imaging/glf/api.h"
38 #include "pxr/imaging/garch/glApi.h"
44 PXR_NAMESPACE_OPEN_SCOPE
47 #define GLF_TEXTURE_TOKENS \
75 GLuint textureId, GLuint samplerId)
79 , textureId(textureId)
80 , samplerId(samplerId) { }
88 typedef std::vector<Binding> BindingVector;
101 GLuint samplerId = 0) = 0;
118 virtual VtDictionary GetTextureInfo(
bool forceLoad) = 0;
121 virtual bool IsMinFilterSupported(GLenum filter);
124 virtual bool IsMagFilterSupported(GLenum filter);
143 bool IsOriginLowerLeft()
const;
153 void _SetMemoryUsed(
size_t size);
156 virtual void _OnMemoryRequestedDirty();
159 void _UpdateContentsID();
163 size_t _memoryRequested;
170 virtual GlfTextureRefPtr New(
const TfToken& texturePath,
174 PXR_NAMESPACE_CLOSE_SCOPE
176 #endif // PXR_IMAGING_GLF_TEXTURE_H
GLF_API size_t GetMemoryRequested() const
Amount of memory the user wishes to allocate to the texture.
Standard pointer typedefs.
A map with string keys and VtValue values.
Pointer storage with deletion detection.
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
A texture has one or more bindings which describe how the different aspects of the texture should be ...
Base class of all factory types.
Enable a concrete base class for use with TfRefPtr.
ImageOriginLocation
Specifies whether to treat the image origin as the upper-left corner or the lower left...
Token for efficient comparison, assignment, and hashing of known strings.
virtual GLuint GetGlTextureName()=0
Returns the OpenGl texture name for the texture.
GLF_API size_t GetContentsID() const
Returns an identifier that can be used to determine when the contents of this texture (i...
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
GLF_API size_t GetMemoryUsed() const
Amount of memory used to store the texture.
static GLF_API size_t GetTextureMemoryAllocated()
static reporting function
This file defines some macros that are useful for declaring and using static TfTokens.
virtual BindingVector GetBindings(TfToken const &identifier, GLuint samplerId=0)=0
Returns the bindings to use this texture for the shader resource named identifier.
Represents a texture object in Glf.
Enable a concrete base class for use with TfWeakPtr.
GLF_API void SetMemoryRequested(size_t targetMemory)
Specify the amount of memory the user wishes to allocate to the texture.