3 #include "Restorable.h" 13 shader(): program(0), flags(0) {}
21 void init(
const std::vector<unsigned char>& baseShader,
const char* prepend =
"",
const char* append =
"");
25 typedef Closure<void (IVideoDriver*, ShaderProgram*)> ShaderUniformsCallback;
27 ShaderUniformsCallback getShaderUniformsCallback()
const {
return _cb; }
28 void setShaderUniformsCallback(ShaderUniformsCallback cb) {_cb = cb;}
31 virtual ShaderProgram* getShaderProgram(
int flags) = 0;
35 void* _getRestorableObject() {
return this;}
36 void _restore(Restorable*,
void*);
38 std::vector<unsigned char> _data;
39 ShaderUniformsCallback _cb;
41 virtual void releaseShaders() {}
52 ALPHA_PREMULTIPLY = 1,
53 SEPARATE_ALPHA = 1 << 1,
54 MASK_R_CHANNEL = 1 << 2,
72 void apply(
IVideoDriver* driver, spNativeTexture base, spNativeTexture alpha);
75 void releaseShaders()
override;
76 shader _shaders[_SIZE];
Definition: ShaderProgram.h:7
Definition: UberShaderProgram.h:8
Definition: UberShaderProgram.h:44
–oxgl-end–!
Definition: Actor.h:14
Definition: UberShaderProgram.h:11
Definition: Restorable.h:8
Definition: VideoDriver.h:12