love.graphics.getBlendMode no longer does several glGetInteger function calls

This commit is contained in:
Alex Szpakowski
2014-01-30 21:51:17 -04:00
parent 40242689b1
commit 9e746c56fa
3 changed files with 83 additions and 78 deletions
+20
View File
@@ -94,6 +94,13 @@ public:
}
};
struct BlendState
{
GLenum srcRGB, srcA;
GLenum dstRGB, dstA;
GLenum func;
};
OpenGL();
/**
@@ -167,6 +174,17 @@ public:
**/
Viewport getScissor() const;
/**
* Sets blending functionality.
* Note: This does not globally enable or disable blending.
**/
void setBlendState(const BlendState &blend);
/**
* Gets the currently set blending functionality.
**/
BlendState getBlendState() const;
/**
* Helper for setting the active texture unit.
*
@@ -267,6 +285,8 @@ private:
Viewport viewport;
Viewport scissor;
BlendState blend;
// The last ID value used for pseudo-instancing.
int lastPseudoInstanceID;