20 #include "../gpu/variables_bundle.h"
21 #include "../gpu/pipeline.h"
22 #include "../context.h"
23 #include "../exception.h"
87 void bindSamplerArray(
const char* uniformId,
int startingUnit,
int numUnits);
A very basic class for any image.
2x3 affine mapping containing a 2x2 matrix and a 2D point
Basic class: task and memory management, any kind of static data.
GL::RecycleBin * getGpuRecycleBin() const
Base class for all exceptions.
Stores references to GPU resources that will not be used anymore and needed to be recycled in a threa...
GLSL program to render images Makes use of default vertex attributes to pass the texture coordinates ...
TextureFormat
Texture format, specifies how the texture should be interpreted on the shader side.
Internal low-level GPU control API.
Expection thrown if no shader source is provided.
A GLSL program to process images.
void process(GraphicPipeline &gpu)
Apply the shader to produce an image.
bool upToDate
if true, the program is up-to-date with respect to the source code
void setOutputClipping(const IntRectangle &rectangle)
Sets output clipping area.
void prepare(GraphicPipeline &gpu, GL::TextureHandler *input, const TextureParam texParam, AbstractBitmap *output, const AffineMapping &mapping)
Conducts required preparations for blending.
static const std::string CODE_HEADER
Shader code header containing necessary declarations.
bool usesContext(Context &context) const
Returns true if the shader has ressources attached to a given context.
GL::TextureHandler::TextureFormat inputFormat
last used input texture format; when changed, the shader is recompiled
void setSourceCode(const std::string &sourceCode)
Passes new source code to the fragment shader.
GL::RecycleBin & recycleBin
std::string sourceCode
last passed fragment shader source code
IntRectangle outputClipRect
output clip rectangle: only this specified area of the output image will be changed
GL::RenderingProgram * program
static const std::string INPUT_IMAGE_DECL_TYPE
A virtual input image type defined at shader compile time by ordinary texture or OES texture sampler ...
ImageShader(const ImageShader &)=delete
disabling copying constructor
void bindSamplerArray(const char *uniformId, int startingUnit, int numUnits)
Binds a bunch of texture units to a uniform sampler array variable.
static const std::string INPUT_IMAGE_ID
Shader variable name referring to the input image.
TextureParam
Parameters of binding a texture to a texture unit on GPU.
Beatmup::AffineMapping & mapping