20 #include "../gpu/gpu_task.h"
21 #include "../bitmap/abstract_bitmap.h"
22 #include "../geometry.h"
33 std::map<std::string, AbstractBitmap*>
samplers;
A very basic class for any image.
2x3 affine mapping containing a 2x2 matrix and a 2D point
Makes sure the bitmap content is accessible within an image processing task.
Template of a task using GPU.
Internal low-level GPU control API.
A GLSL program to process images.
static const std::string INPUT_IMAGE_ID
Shader variable name referring to the input image.
A task applying an image shader to a bitmap.
AbstractBitmap * getOutputBitmap() const
std::map< std::string, AbstractBitmap * > samplers
void clearSamplers()
Clears all connections of bitmaps to samplers.
void setShader(ImageShader *shader)
void addSampler(AbstractBitmap *bitmap, const std::string uniformName=ImageShader::INPUT_IMAGE_ID)
Connects a bitmap to a shader uniform variable.
void beforeProcessing(ThreadIndex threadCount, ProcessingTarget target, GraphicPipeline *gpu)
Instruction called before the task is executed.
bool processOnGPU(GraphicPipeline &gpu, TaskThread &thread)
Executes the task on GPU.
void setOutputBitmap(AbstractBitmap *bitmap)
AbstractBitmap * mainInput
const size_t getSamplersCount() const
ImageShader * getShader() const
void afterProcessing(ThreadIndex threadCount, GraphicPipeline *gpu, bool aborted)
Instruction called after the task is executed.
bool removeSampler(const std::string uniformName)
Removes a sampler with a uniform variable name.
unsigned char ThreadIndex
number of threads / thread index
Beatmup::InternalBitmap * bitmap