Added BlendEquation and BlendFunc to RenderState, and cleaned it up A LOT

This commit is contained in:
2015-12-14 20:13:45 +01:00
parent 25683e8a8a
commit 522679b14c
4 changed files with 80 additions and 87 deletions
+11 -7
View File
@@ -1,6 +1,7 @@
#ifndef RenderState_h__
#define RenderState_h__
#include <functional>
#include "../Common.h"
#include "../OpenGL.h"
#include "../GLM.h"
@@ -8,16 +9,19 @@
class RenderState
{
public:
RenderState();
RenderState() = default;
~RenderState();
bool Enable(GLenum GLEnable);
bool CullFace(GLenum GlFaceToCull);
bool Enable(GLenum cap);
bool Disable(GLenum cap);
bool CullFace(GLenum mode);
bool ClearColor(glm::vec4 color);
bool Clear(GLbitfield mask);
bool BindBuffer(GLint buffer);
bool BindFramebuffer(GLint framebuffer);
bool BlendEquation(GLenum mode);
bool BlendFunc(GLenum sfactor, GLenum dfactor);
private:
std::vector<GLenum> m_Enables;
float m_preClearColor[4];
int m_preBuffer;
std::vector<std::function<void(void)>> m_ResetFunctions;
};
#endif