|
| CShaderGL (RETRO::CRenderContext &context) |
|
bool | CreateVertexBuffer (unsigned vertCount, unsigned vertSize) override |
| Construct the vertex buffer that will be used to render the shader. More...
|
|
bool | Create (const std::string &shaderSource, const std::string &shaderPath, ShaderParameterMap shaderParameters, IShaderSampler *sampler, ShaderLutVec luts, float2 viewPortSize, unsigned frameCountMod=0) override |
| Construct the vidoe shader instance. More...
|
|
void | Render (IShaderTexture *source, IShaderTexture *target) override |
| Renders the video shader to the target texture. More...
|
|
void | SetSizes (const float2 &prevSize, const float2 &nextSize) override |
| Sets the input and output sizes in pixels. More...
|
|
void | PrepareParameters (CPoint dest[4], bool isLastPass, uint64_t frameCount) override |
| Called before rendering. Updates any internal state needed to ensure that correct data is passed to the shader when rendering. More...
|
|
void | UpdateMVP () override |
| Updates the model view projection matrix. Should usually only be called when the viewport/window size changes.
|
|
bool | CreateInputBuffer () override |
|
void | UpdateInputBuffer (uint64_t frameCount) |
|
void | GetUniformLocs () |
|
|
void | SetShaderParameters () |
|
◆ Create()
bool CShaderGL::Create |
( |
const std::string & |
shaderSource, |
|
|
const std::string & |
shaderPath, |
|
|
ShaderParameterMap |
shaderParameters, |
|
|
IShaderSampler * |
sampler, |
|
|
ShaderLutVec |
luts, |
|
|
float2 |
viewPortSize, |
|
|
unsigned |
frameCountMod = 0 |
|
) |
| |
|
overridevirtual |
Construct the vidoe shader instance.
- Parameters
-
shaderSource | Source code of the shader (both vertex and pixel/fragment) |
shaderPath | Full path to the shader file |
shaderParameters | Struct with all parameters pertaining to the shader |
sampler | Pointer to the sampler that the will be used when sampling textures |
luts | Look-up textures pertaining to shader |
viewPortSize | Size of the window/viewport |
frameCountMod | Modulo that must be applied to the frame count before sendign it to the shader |
- Returns
- False if creating the shader failed, true otherwise.
- Todo:
- Remove sampler input from IShader.h
- Todo:
- Make this good
Implements KODI::SHADER::IShader.
◆ CreateInputBuffer()
bool CShaderGL::CreateInputBuffer |
( |
| ) |
|
|
overridevirtual |
◆ CreateVertexBuffer()
bool CShaderGL::CreateVertexBuffer |
( |
unsigned |
vertCount, |
|
|
unsigned |
vertSize |
|
) |
| |
|
overridevirtual |
Construct the vertex buffer that will be used to render the shader.
- Parameters
-
vertCount | Number of vertices to construct. Commonly 4, for rectangular screens. |
vertSize | Size of each vertex's data in bytes |
- Returns
- False if creating the vertex buffer failed, true otherwise.
Implements KODI::SHADER::IShader.
◆ PrepareParameters()
void CShaderGL::PrepareParameters |
( |
CPoint |
dest[4], |
|
|
bool |
isLastPass, |
|
|
uint64_t |
frameCount |
|
) |
| |
|
overridevirtual |
Called before rendering. Updates any internal state needed to ensure that correct data is passed to the shader when rendering.
- Parameters
-
dest | Coordinates of the 4 corners of the output viewport/window |
isLastPass | True if the current shader is last one in the pipeline // TODO: this could be a member |
frameCount | Number of frames that have passed |
Implements KODI::SHADER::IShader.
◆ Render()
Renders the video shader to the target texture.
- Parameters
-
source | Source texture to pass to the shader as input |
target | Target texture to render the shader to |
Implements KODI::SHADER::IShader.
◆ SetSizes()
void CShaderGL::SetSizes |
( |
const float2 & |
prevSize, |
|
|
const float2 & |
nextSize |
|
) |
| |
|
overridevirtual |
Sets the input and output sizes in pixels.
- Parameters
-
prevSize | Input image size of the shader in pixels |
nextSize | Output image size of the shader in pixels |
Implements KODI::SHADER::IShader.
◆ UpdateInputBuffer()
void CShaderGL::UpdateInputBuffer |
( |
uint64_t |
frameCount | ) |
|
The documentation for this class was generated from the following files:
- xbmc/cores/RetroPlayer/shaders/gl/ShaderGL.h
- xbmc/cores/RetroPlayer/shaders/gl/ShaderGL.cpp