Files
axyz/include/Engine/Rendering/RenderState.h
T
2016-02-04 14:33:39 +01:00

31 lines
798 B
C++

#ifndef RenderState_h__
#define RenderState_h__
#include <functional>
#include <boost/range/adaptor/reversed.hpp>
#include "../Common.h"
#include "../OpenGL.h"
#include "../GLM.h"
class RenderState
{
public:
RenderState() = default;
~RenderState();
bool Enable(GLenum cap);
bool Disable(GLenum cap);
bool CullFace(GLenum mode);
bool ClearColor(glm::vec4 color);
bool BindFramebuffer(GLint framebuffer);
bool BlendEquation(GLenum mode);
bool BlendFunc(GLenum sfactor, GLenum dfactor);
bool StencilOp(GLenum sfail, GLenum dpfail, GLenum dppass);
bool StencilFunc(GLenum func, GLint ref, GLuint mask);
bool StencilMask(GLuint mask);
bool DepthMask(GLboolean flag);
private:
std::vector<std::function<void(void)>> m_ResetFunctions;
};
#endif