mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-16 20:59:59 +01:00
Cleanup source tree
Move all C++ source files in the src subfolder. Adapted the cmake process accordingly and cleanup.
This commit is contained in:
76
src/ImageShader.h
Normal file
76
src/ImageShader.h
Normal file
@@ -0,0 +1,76 @@
|
||||
#ifndef IMAGESHADER_H
|
||||
#define IMAGESHADER_H
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "Shader.h"
|
||||
|
||||
class ImageShader : public Shader
|
||||
{
|
||||
|
||||
public:
|
||||
ImageShader();
|
||||
|
||||
void use() override;
|
||||
void reset() override;
|
||||
void accept(Visitor& v) override;
|
||||
void copy(ImageShader const& S);
|
||||
|
||||
uint mask_texture;
|
||||
|
||||
// uniforms
|
||||
float stipple;
|
||||
};
|
||||
|
||||
class AlphaShader : public ImageShader
|
||||
{
|
||||
|
||||
public:
|
||||
AlphaShader();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class MaskShader : public Shader
|
||||
{
|
||||
|
||||
public:
|
||||
MaskShader();
|
||||
|
||||
void use() override;
|
||||
void reset() override;
|
||||
void accept(Visitor& v) override;
|
||||
void copy(MaskShader const& S);
|
||||
|
||||
enum Modes {
|
||||
NONE = 0,
|
||||
PAINT = 1,
|
||||
SHAPE = 2
|
||||
};
|
||||
uint mode;
|
||||
|
||||
enum Shapes {
|
||||
ELIPSE = 0,
|
||||
OBLONG = 1,
|
||||
RECTANGLE = 2,
|
||||
HORIZONTAL = 3,
|
||||
VERTICAL = 4
|
||||
};
|
||||
uint shape;
|
||||
|
||||
// uniforms
|
||||
glm::vec2 size;
|
||||
float blur;
|
||||
|
||||
int option;
|
||||
int effect;
|
||||
glm::vec4 cursor;
|
||||
glm::vec3 brush;
|
||||
|
||||
static const char* mask_names[3];
|
||||
static const char* mask_shapes[5];
|
||||
};
|
||||
|
||||
#endif // IMAGESHADER_H
|
||||
Reference in New Issue
Block a user