| 123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef ANKI_RESOURCE_SHADER_PROGRAM_RESOURCE_H
- #define ANKI_RESOURCE_SHADER_PROGRAM_RESOURCE_H
- #include "anki/gl/ShaderProgram.h"
- namespace anki {
- /// Shader program resource
- class ShaderProgramResource: public ShaderProgram
- {
- public:
- ShaderProgramResource()
- {}
- ~ShaderProgramResource()
- {}
- /// Resource load
- void load(const char* filename);
- /// Load and add extra code on top of the file
- void load(const char* filename, const char* extraSrc);
- /// Used by @ref Material and @ref Renderer to create custom shaders in
- /// the cache
- /// @param sProgFPathName The file pathname of the shader prog
- /// @param preAppendedSrcCode The source code we want to write on top
- /// of the shader prog
- /// @return The file pathname of the new shader prog. Its
- /// $HOME/.anki/cache/newFNamePrefix_fName
- static std::string createSrcCodeToCache(const char* sProgFPathName,
- const char* preAppendedSrcCode);
- };
- } // end namespace
- #endif
|