Merged love-experiments/love.graphics.setColorMask into default

This commit is contained in:
Alex Szpakowski
2013-03-27 19:43:04 -03:00
4 changed files with 66 additions and 2 deletions
+16
View File
@@ -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;