Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
CShaderProgram

Public Member Functions

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.
 
 CShaderProgram ()=default
 Construct a new shader.
 
 CShaderProgram (const std::string &vert, const std::string &frag)
 Construct a new shader and load defined shader files.
 
void DisableShader ()
 To deactivate the shader use on the GPU.
 
bool EnableShader ()
 To activate the shader and use it on the GPU.
 
bool LoadShaderFiles (const std::string &vert, const std::string &frag)
 To load manually the needed shader files.
 
virtual void OnCompiledAndLinked ()
 Mandatory child function to set the necessary CPU to GPU data.
 
virtual void OnDisabled ()
 Optional child function that may have to be performed when switching off the shader.
 
virtual bool OnEnabled ()
 Optional function to exchange data between CPU and GPU while activating the shader.
 
ATTR_FORCEINLINE CPixelShaderPixelShader ()
 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.
 
ATTR_FORCEINLINE bool ShaderOK () const
 Used to check if shader has been loaded before.
 
ATTR_FORCEINLINE CVertexShaderVertexShader ()
 To get the vertex shader class used by Kodi at the addon.
 
virtual ~CShaderProgram ()
 Destructor.
 

The documentation for this class was generated from the following file: