Cleanup source tree

Move all C++ source files in the src subfolder. Adapted the cmake process accordingly and cleanup.
This commit is contained in:
Bruno Herbelin
2022-10-25 00:29:22 +02:00
parent 77ac7eca18
commit e9b72b442a
164 changed files with 425 additions and 397 deletions

76
src/ImageShader.h Normal file
View 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