1 #ifndef VVGL_GLCachedUni_h 2 #define VVGL_GLCachedUni_h 4 #include "VVGL_Defines.hpp" 8 #include "VVGL_StringUtils.hpp" 50 virtual void cacheTheLoc(
const int32_t & inPgmToCheck);
51 inline void purgeCache() { loc=-1; prog=-1; }
54 int32_t
location(
const int32_t & inGLProgram) {
if (loc<0 || inGLProgram<0 || inGLProgram!=prog) cacheTheLoc(inGLProgram);
return loc; }
55 string getDescriptionString()
const {
return FmtString(
"<GLCachedProperty \"%s\", %d>",this->name.c_str(),this->loc); }
56 friend ostream & operator<<(ostream & os,
const GLCachedProperty & n) { os<<n.getDescriptionString();
return os; }
72 string getDescriptionString()
const {
return FmtString(
"<GLCachedAttrib \"%s\", %d>",this->name.c_str(),this->loc); }
79 void cacheTheLoc(
const int32_t & inPgmToCheck)
override;
96 string getDescriptionString()
const {
return FmtString(
"<GLCachedUni \"%s\", %d>",this->name.c_str(),this->loc); }
99 void cacheTheLoc(
const int32_t & inPgmToCheck)
override;
int32_t location(const int32_t &inGLProgram)
Returns the location of the property cached by the receiver. A valid GL context must be current befor...
Definition: GLCachedProperty.hpp:54
Definition: GLBuffer.hpp:13
Subclass of GLCachedProperty that caches the location of a uniform variable in a GLSL program...
Definition: GLCachedProperty.hpp:89
Subclass of GLCachedProperty that caches the location of an attribute in a GLSL program.
Definition: GLCachedProperty.hpp:66
Abstract base class that caches the location of an arbitrary GL "object" that we do not own...
Definition: GLCachedProperty.hpp:34