mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Merged love-experiments/love.graphics.setColorMask into default
This commit is contained in:
@@ -77,6 +77,9 @@ struct DisplayState
|
||||
bool scissor;
|
||||
GLint scissorBox[4];
|
||||
|
||||
// Color mask.
|
||||
bool colorMask[4];
|
||||
|
||||
// Window info.
|
||||
std::string caption;
|
||||
bool mouseVisible;
|
||||
@@ -94,6 +97,7 @@ struct DisplayState
|
||||
pointSize = 1.0f;
|
||||
pointStyle = Graphics::POINT_SMOOTH;
|
||||
scissor = false;
|
||||
colorMask[0] = colorMask[1] = colorMask[2] = colorMask[3] = true;
|
||||
caption = "";
|
||||
mouseVisible = true;
|
||||
}
|
||||
@@ -299,6 +303,17 @@ public:
|
||||
**/
|
||||
Font *getFont() const;
|
||||
|
||||
/**
|
||||
* Sets the enabled color components when rendering.
|
||||
**/
|
||||
void setColorMask(bool r, bool g, bool b, bool a);
|
||||
|
||||
/**
|
||||
* Gets the current color mask.
|
||||
* Returns an array of 4 booleans representing the mask.
|
||||
**/
|
||||
const bool *getColorMask() const;
|
||||
|
||||
/**
|
||||
* Sets the current blend mode.
|
||||
**/
|
||||
@@ -495,6 +510,7 @@ private:
|
||||
float lineWidth;
|
||||
GLint matrixLimit;
|
||||
GLint userMatrices;
|
||||
bool colorMask[4];
|
||||
|
||||
int getRenderWidth() const;
|
||||
int getRenderHeight() const;
|
||||
|
||||
Reference in New Issue
Block a user