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