10 #ifndef RV_TextureRef_h
11 #define RV_TextureRef_h
30 {
return myTexID != -1 && !myIsMissingTex; }
34 {
return myIsPlaceholder; }
37 {
return myIsMissingTex; }
40 {
return myIsLoading; }
49 myIsMissingTex =
false;
50 myIsPlaceholder =
false;
59 bool isUDIM()
const {
return myUDIMW > 0; }
69 void getRes(
int *
w,
int *
h =
nullptr,
int *d =
nullptr)
const
90 myTexID = other.myTexID;
91 myCacheVersion = other.myCacheVersion;
92 myCacheRefresh = other.myCacheRefresh;
93 myIsMissingTex = other.myIsMissingTex;
94 myIsPlaceholder = other.myIsPlaceholder;
95 myIsLoading = other.myIsLoading;
96 myIsDirty = other.myIsDirty;
99 myRef->refCount.add(-1);
102 myRef->refCount.add(1);
104 myUDIMX = other.myUDIMX;
105 myUDIMY = other.myUDIMY;
106 myUDIMW = other.myUDIMW;
107 myUDIMH = other.myUDIMH;
108 myWidth = other.myWidth;
109 myHeight = other.myHeight;
110 myDepth = other.myDepth;
111 myAspectRatio = other.myAspectRatio;
112 myChannels = other.myChannels;
113 myTypeInfo = other.myTypeInfo;
115 myTexType = other.myTexType;
135 exint myCacheVersion = 0;
136 exint myCacheRefresh = 0;
137 bool myIsMissingTex =
false;
138 bool myIsPlaceholder =
false;
139 bool myIsLoading =
false;
140 bool myIsDirty =
false;
151 fpreal myAspectRatio = 1.0;
fpreal getImageAspectRatio() const
bool isDirty() const
Texture has been changed since last check.
bool isValid() const
Reference to a valid texture.
Opaque reference to a texture stored in the RV_TextureCache.
void getUDIMParms(int &x, int &y, int &w, int &h) const
Returns the UDIM range of the texture files (eg. (0,0) -> (3,2))
RV_TextureRef(const RV_TextureRef &other)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void reset()
Reset the reference to a null handle.
bool isMissingTex() const
Texture couldn't be found or resolved.
bool isUDIM() const
Returns true if the reference is to a series of UDIM texture files.
RV_ImageDim getImageDim() const
Returns texture dimension.
void getRes(int *w, int *h=nullptr, int *d=nullptr) const
bool isPlaceholder() const
Texture is missing; a default color used instead.
GLfloat GLfloat GLfloat GLfloat h
Global cache of vulkan textures sourced from files.
bool isLoading() const
Texture is currently loading in the background.
GLubyte GLubyte GLubyte GLubyte w
RV_TextureRef & operator=(const RV_TextureRef &other)