64 #ifndef RE_ShaderHandle_h
65 #define RE_ShaderHandle_h
82 bool register_shader =
true,
83 const char *defines =
nullptr,
92 bool register_shader =
true,
93 const char *defines =
nullptr,
102 return myShader.get();
107 { myDefines.harden(defines); }
110 { myDefines +=
"\n"; myDefines += defines; }
125 return (myShader !=
nullptr);
141 void printErrors(std::ostream &os)
const;
145 const char *
getErrors()
const {
return myErrors.nonNullBuffer(); }
162 if(!theVendorDefines.isstring())
163 initializeDriverInformation(r);
164 return theVendorDefines;
168 static void initializeDriverInformation(
RE_Render *
r);
const char * getErrors() const
const char * getDefines() const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
RE_ShaderLanguage myShaderLanguage
void appendProgramDefines(const char *defines)
Add more defines to the defines list.
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
UT_UniquePtr< RE_Shader > myShader
bool isInitialized() const
void setProgramDefines(const char *defines)
Set the defines for the program, overwriting existing ones.
static const char * getSystemDefines(RE_Render *r)
Returns a list of #defines for platform, vendor, driver version.
static UT_String theVendorDefines
const char * getSourceFiles() const
RE_Shader * getShader() const
int getCodeVersion() const
Returns the GLSL or Cg version that the shader was compiled with.
bool isValid(RE_Render *r)
Simple interface to building a shader from a .prog file.