Allow setting alpha value for ignorezero layer rule (#2477)
* rename ignorezero to ignorealpha * allow setting ignorealpha value This commit allows setting a float value (0-1) for the ignorealpha layer rule. Does not yet have error handling; invalid ignorealpha layer rule will crash Hyprland. * add brackets i forgot to add * prevent crash with invalid ignorealpha value prevents hyprland from immediately crashing with invalid ignorealpha layer rule does not log * don't try to set ignoreAlphaValue if alpha value not specified * add catch to try, reintroduce ignorezero - added catch after try cuz i was an idiot - re-add ignorezero as an alternative to ignorealpha to not introduce a breaking change * add logging for failed ignorealpha layer rule * fix get ignorealpha's get VALUE * check npos and use empty() * rename VALUE cuz no longer const * format Shader.hpp
This commit is contained in:
parent
10fd75c833
commit
e1edfde539
8 changed files with 81 additions and 58 deletions
|
|
@ -7,44 +7,45 @@ class CShader {
|
|||
public:
|
||||
~CShader();
|
||||
|
||||
GLuint program = 0;
|
||||
GLint proj;
|
||||
GLint color;
|
||||
GLint tex;
|
||||
GLint alpha;
|
||||
GLint posAttrib;
|
||||
GLint texAttrib;
|
||||
GLint discardOpaque;
|
||||
GLint discardAlphaZero;
|
||||
GLuint program = 0;
|
||||
GLint proj;
|
||||
GLint color;
|
||||
GLint tex;
|
||||
GLint alpha;
|
||||
GLint posAttrib;
|
||||
GLint texAttrib;
|
||||
GLint discardOpaque;
|
||||
GLint discardAlpha;
|
||||
GLfloat discardAlphaValue;
|
||||
|
||||
GLint topLeft;
|
||||
GLint bottomRight;
|
||||
GLint fullSize;
|
||||
GLint fullSizeUntransformed;
|
||||
GLint radius;
|
||||
GLint primitiveMultisample;
|
||||
GLint topLeft;
|
||||
GLint bottomRight;
|
||||
GLint fullSize;
|
||||
GLint fullSizeUntransformed;
|
||||
GLint radius;
|
||||
GLint primitiveMultisample;
|
||||
|
||||
GLint thick;
|
||||
GLint thick;
|
||||
|
||||
GLint halfpixel;
|
||||
GLint halfpixel;
|
||||
|
||||
GLint range;
|
||||
GLint shadowPower;
|
||||
GLint range;
|
||||
GLint shadowPower;
|
||||
|
||||
GLint applyTint;
|
||||
GLint tint;
|
||||
GLint applyTint;
|
||||
GLint tint;
|
||||
|
||||
GLint gradient;
|
||||
GLint gradientLength;
|
||||
GLint angle;
|
||||
GLint gradient;
|
||||
GLint gradientLength;
|
||||
GLint angle;
|
||||
|
||||
GLint time;
|
||||
GLint distort;
|
||||
GLint output;
|
||||
GLint time;
|
||||
GLint distort;
|
||||
GLint output;
|
||||
|
||||
GLint getUniformLocation(const std::string&);
|
||||
GLint getUniformLocation(const std::string&);
|
||||
|
||||
void destroy();
|
||||
void destroy();
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, GLint> m_muUniforms;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue