![]() |
Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
|
#include <Shader.h>
Public Member Functions | |
CShaderProgram ()=default | |
Construct a new shader. More... | |
CShaderProgram (const std::string &vert, const std::string &frag) | |
Construct a new shader and load defined shader files. More... | |
virtual | ~CShaderProgram () |
Destructor. More... | |
bool | LoadShaderFiles (const std::string &vert, const std::string &frag) |
To load manually the needed shader files. More... | |
bool | CompileAndLink (const std::string &vertexExtraBegin="", const std::string &vertexExtraEnd="", const std::string &fragmentExtraBegin="", const std::string &fragmentExtraEnd="") |
To compile and link the shader to the GL interface. More... | |
bool | EnableShader () |
To activate the shader and use it on the GPU. More... | |
void | DisableShader () |
To deactivate the shader use on the GPU. More... | |
ATTR_FORCEINLINE bool | ShaderOK () const |
Used to check if shader has been loaded before. More... | |
ATTR_FORCEINLINE CVertexShader & | VertexShader () |
To get the vertex shader class used by Kodi at the addon. More... | |
ATTR_FORCEINLINE CPixelShader & | PixelShader () |
To get the fragment shader class used by Kodi at the addon. More... | |
ATTR_FORCEINLINE GLuint | ProgramHandle () |
Used to get the definition created in the OpenGL itself. More... | |
virtual void | OnCompiledAndLinked () |
Mandatory child function to set the necessary CPU to GPU data. More... | |
virtual bool | OnEnabled () |
Optional function to exchange data between CPU and GPU while activating the shader. More... | |
virtual void | OnDisabled () |
Optional child function that may have to be performed when switching off the shader. More... | |