Tech ENABLE_COLOR_CLASSES - 1st installment -> Introduction of classes ColorRGB and ColorRGBA to unify color data definition and manipulation
This commit is contained in:
parent
48098fbaff
commit
cd4094743e
53 changed files with 1810 additions and 60 deletions
|
@ -9,6 +9,11 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
#if ENABLE_COLOR_CLASSES
|
||||
class ColorRGB;
|
||||
class ColorRGBA;
|
||||
#endif // ENABLE_COLOR_CLASSES
|
||||
|
||||
class GLShaderProgram
|
||||
{
|
||||
public:
|
||||
|
@ -60,6 +65,10 @@ public:
|
|||
void set_uniform(const char* name, const Matrix3f& value) const { set_uniform(get_uniform_location(name), value); }
|
||||
void set_uniform(const char* name, const Vec3f& value) const { set_uniform(get_uniform_location(name), value); }
|
||||
void set_uniform(const char* name, const Vec3d& value) const { set_uniform(get_uniform_location(name), value); }
|
||||
#if ENABLE_COLOR_CLASSES
|
||||
void set_uniform(const char* name, const ColorRGB& value) const { set_uniform(get_uniform_location(name), value); }
|
||||
void set_uniform(const char* name, const ColorRGBA& value) const { set_uniform(get_uniform_location(name), value); }
|
||||
#endif // ENABLE_COLOR_CLASSES
|
||||
|
||||
void set_uniform(int id, int value) const;
|
||||
void set_uniform(int id, bool value) const;
|
||||
|
@ -77,6 +86,10 @@ public:
|
|||
void set_uniform(int id, const Matrix3f& value) const;
|
||||
void set_uniform(int id, const Vec3f& value) const;
|
||||
void set_uniform(int id, const Vec3d& value) const;
|
||||
#if ENABLE_COLOR_CLASSES
|
||||
void set_uniform(int id, const ColorRGB& value) const;
|
||||
void set_uniform(int id, const ColorRGBA& value) const;
|
||||
#endif // ENABLE_COLOR_CLASSES
|
||||
|
||||
// returns -1 if not found
|
||||
int get_attrib_location(const char* name) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue