![]() |
Miam-Player
0.8.0
A nice music player
|
The VideoShader class Represents a shader for rendering a video frame. More...
#include <VideoShader.h>
Public Member Functions | |
VideoShader () | |
virtual | ~VideoShader () |
virtual char const *const * | attributeNames () const |
attributeNames Array must end with null. More... | |
virtual const char * | vertexShader () const |
vertexShader mvp uniform: u_Matrix Vertex shader in: a_Position, a_TexCoordsN (see attributeNames()) Vertex shader out: v_TexCoordsN More... | |
virtual const char * | fragmentShader () const |
virtual void | initialize (QOpenGLShaderProgram *shaderProgram=0) |
initialize More... | |
int | uniformLocation (const char *name) const |
int | textureLocationCount () const |
textureLocationCount number of texture locations is 1: packed RGB number of channels: yuv or plannar RGB More... | |
int | textureLocation (int index) const |
int | matrixLocation () const |
int | colorMatrixLocation () const |
int | opacityLocation () const |
int | channelMapLocation () const |
int | texelSizeLocation () const |
int | textureSizeLocation () const |
VideoFormat | videoFormat () const |
int | textureTarget () const |
QOpenGLShaderProgram * | program () |
bool | update (VideoMaterial *material) |
update Upload textures, setup uniforms before rendering. More... | |
Protected Member Functions | |
void | rebuildLater () |
rebuild shader program before next rendering. call this if shader code is updated More... | |
VideoShader (VideoShaderPrivate &d) | |
Friends | |
class | VideoMaterial |
The VideoShader class Represents a shader for rendering a video frame.
Low-level api. Used by OpenGLVideo and Scene Graph. You can also create your own shader. Usually only sampling function and rgb post processing are enough. Transforming color to rgb is done internally. TODO: vertex shader (fully controlled by user?). Mesh
QtAV::VideoShader::VideoShader | ( | ) |
|
virtual |
|
protected |
|
virtual |
attributeNames Array must end with null.
{ position, texcoord, ..., 0}, location is bound to 0, 1, ...
int QtAV::VideoShader::channelMapLocation | ( | ) | const |
int QtAV::VideoShader::colorMatrixLocation | ( | ) | const |
|
virtual |
|
virtual |
initialize
shaderProgram | 0 means create a shader program internally. if not linked, vertex/fragment shader will be added and linked |
int QtAV::VideoShader::matrixLocation | ( | ) | const |
int QtAV::VideoShader::opacityLocation | ( | ) | const |
QOpenGLShaderProgram* QtAV::VideoShader::program | ( | ) |
|
protected |
rebuild shader program before next rendering. call this if shader code is updated
int QtAV::VideoShader::texelSizeLocation | ( | ) | const |
int QtAV::VideoShader::textureLocation | ( | int | index | ) | const |
int QtAV::VideoShader::textureLocationCount | ( | ) | const |
textureLocationCount number of texture locations is 1: packed RGB number of channels: yuv or plannar RGB
int QtAV::VideoShader::textureSizeLocation | ( | ) | const |
int QtAV::VideoShader::textureTarget | ( | ) | const |
int QtAV::VideoShader::uniformLocation | ( | const char * | name | ) | const |
bool QtAV::VideoShader::update | ( | VideoMaterial * | material | ) |
update Upload textures, setup uniforms before rendering.
If material type changed, build a new shader program.
|
virtual |
vertexShader mvp uniform: u_Matrix Vertex shader in: a_Position, a_TexCoordsN (see attributeNames()) Vertex shader out: v_TexCoordsN
VideoFormat QtAV::VideoShader::videoFormat | ( | ) | const |
|
friend |