// // Copyright 2015 Pixar // // Licensed under the terms set forth in the LICENSE.txt file available at // https://opensubdiv.org/license. // #ifndef OPENSUBDIV_EXAMPLES_GL_SHADER_CACHE_H #define OPENSUBDIV_EXAMPLES_GL_SHADER_CACHE_H #include "glLoader.h" #include #include #include "./shaderCache.h" class GLDrawConfig { public: explicit GLDrawConfig(const std::string &version); ~GLDrawConfig(); bool CompileAndAttachShader(GLenum shaderType, const std::string &source); bool Link(); GLuint GetProgram() const { return _program; } private: GLuint _program; std::string _version; int _numShaders; }; // workaround for template alias #if 0 template using GLShaderCache = ShaderCacheT; #else template class GLShaderCache : public ShaderCacheT { }; #endif #endif // OPENSUBDIV_EXAMPLES_GL_SHADER_CACHE_H