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