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"
44PXR_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,
174PXR_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.