Loading...
Searching...
No Matches
AbstractState.h
Go to the documentation of this file.
#pragma once
#include <array>
#include <glbinding/gl/types.h>
#include <globjects/globjects_api.h>
namespace globjects
{
class StateSetting;
class GLOBJECTS_API AbstractState
{
public:
virtual void enable(gl::GLenum capability) = 0;
virtual void disable(gl::GLenum capability) = 0;
virtual bool isEnabled(gl::GLenum capability) const = 0;
virtual void enable(gl::GLenum capability, int index) = 0;
virtual void disable(gl::GLenum capability, int index) = 0;
virtual bool isEnabled(gl::GLenum capability, int index) const = 0;
void setEnabled(gl::GLenum capability, bool enabled);
void setEnabled(gl::GLenum capability, int index, bool enabled);
void blendColor(gl::GLfloat red, gl::GLfloat green, gl::GLfloat blue, gl::GLfloat alpha);
void blendColor(const std::array<gl::GLfloat, 4> & color);
void blendFunc(gl::GLenum sFactor, gl::GLenum dFactor);
void blendFuncSeparate(gl::GLenum srcRGB, gl::GLenum dstRGB, gl::GLenum srcAlpha, gl::GLenum dstAlpha);
void clearColor(gl::GLfloat red, gl::GLfloat green, gl::GLfloat blue, gl::GLfloat alpha);
void clearColor(const std::array<gl::GLfloat, 4> & color);
void clearDepth(gl::GLfloat depth);
void clearStencil(gl::GLint s);
void colorMask(gl::GLboolean red, gl::GLboolean green, gl::GLboolean blue, gl::GLboolean alpha);
void colorMask(const std::array<gl::GLboolean, 4> & mask);
void cullFace(gl::GLenum mode);
void depthFunc(gl::GLenum func);
void depthMask(gl::GLboolean flag);
void depthRange(gl::GLdouble nearVal, gl::GLdouble farVal);
void depthRange(gl::GLfloat nearVal, gl::GLfloat farVal);
void depthRange(const std::array<gl::GLfloat, 2> & range);
void frontFace(gl::GLenum winding);
void logicOp(gl::GLenum opcode);
void pixelStore(gl::GLenum pname, gl::GLboolean param);
void pixelStore(gl::GLenum pname, gl::GLint param);
void pixelStore(gl::GLenum pname, gl::GLfloat param);
void pointParameter(gl::GLenum pname, gl::GLenum param);
void pointSize(gl::GLfloat size);
void polygonMode(gl::GLenum face, gl::GLenum mode);
void polygonOffset(gl::GLfloat factor, gl::GLfloat units);
void primitiveRestartIndex(gl::GLuint index);
void provokingVertex(gl::GLenum provokeMode);
void sampleCoverage(gl::GLfloat value, gl::GLboolean invert);
void scissor(gl::GLint x, gl::GLint y, gl::GLsizei width, gl::GLsizei height);
void scissor(const std::array<gl::GLint, 4> & scissorBox);
void stencilFunc(gl::GLenum func, gl::GLint ref, gl::GLuint mask);
void stencilMask(gl::GLuint mask);
void stencilOp(gl::GLenum stencilFail, gl::GLenum depthFail, gl::GLenum depthPass);
void stencilFuncSeparate(gl::GLenum face, gl::GLenum func, gl::GLint ref, gl::GLuint mask);
void stencilMaskSeparate(gl::GLenum face, gl::GLuint mask);
void stencilOpSeparate(gl::GLenum face, gl::GLenum stencilFail, gl::GLenum depthFail, gl::GLenum depthPass);
virtual void add(StateSetting * setting) = 0;
template <typename... Arguments>
void set(void (*function)(Arguments...), Arguments... arguments);
};
} // namespace globjects
#include <globjects/AbstractState.inl>
globjects::AbstractState
Definition AbstractState.h:18
globjects::AbstractState::depthRange
void depthRange(gl::GLdouble nearVal, gl::GLdouble farVal)
globjects::AbstractState::blendFuncSeparate
void blendFuncSeparate(gl::GLenum srcRGB, gl::GLenum dstRGB, gl::GLenum srcAlpha, gl::GLenum dstAlpha)
globjects::AbstractState::stencilFunc
void stencilFunc(gl::GLenum func, gl::GLint ref, gl::GLuint mask)
globjects::AbstractState::provokingVertex
void provokingVertex(gl::GLenum provokeMode)
globjects::AbstractState::scissor
void scissor(const std::array< gl::GLint, 4 > &scissorBox)
globjects::AbstractState::disable
virtual void disable(gl::GLenum capability)=0
globjects::AbstractState::logicOp
void logicOp(gl::GLenum opcode)
globjects::AbstractState::clearStencil
void clearStencil(gl::GLint s)
globjects::AbstractState::set
void set(void(*function)(Arguments...), Arguments... arguments)
globjects::AbstractState::pixelStore
void pixelStore(gl::GLenum pname, gl::GLboolean param)
globjects::AbstractState::isEnabled
virtual bool isEnabled(gl::GLenum capability) const =0
globjects::AbstractState::depthFunc
void depthFunc(gl::GLenum func)
globjects::AbstractState::clearColor
void clearColor(const std::array< gl::GLfloat, 4 > &color)
globjects::AbstractState::polygonOffset
void polygonOffset(gl::GLfloat factor, gl::GLfloat units)
globjects::AbstractState::stencilOp
void stencilOp(gl::GLenum stencilFail, gl::GLenum depthFail, gl::GLenum depthPass)
globjects::AbstractState::pointParameter
void pointParameter(gl::GLenum pname, gl::GLenum param)
globjects::AbstractState::depthRange
void depthRange(gl::GLfloat nearVal, gl::GLfloat farVal)
globjects::AbstractState::primitiveRestartIndex
void primitiveRestartIndex(gl::GLuint index)
globjects::AbstractState::stencilFuncSeparate
void stencilFuncSeparate(gl::GLenum face, gl::GLenum func, gl::GLint ref, gl::GLuint mask)
globjects::AbstractState::blendColor
void blendColor(const std::array< gl::GLfloat, 4 > &color)
globjects::AbstractState::depthRange
void depthRange(const std::array< gl::GLfloat, 2 > &range)
globjects::AbstractState::disable
virtual void disable(gl::GLenum capability, int index)=0
globjects::AbstractState::clearDepth
void clearDepth(gl::GLfloat depth)
globjects::AbstractState::frontFace
void frontFace(gl::GLenum winding)
globjects::AbstractState::pointSize
void pointSize(gl::GLfloat size)
globjects::AbstractState::scissor
void scissor(gl::GLint x, gl::GLint y, gl::GLsizei width, gl::GLsizei height)
globjects::AbstractState::stencilMaskSeparate
void stencilMaskSeparate(gl::GLenum face, gl::GLuint mask)
globjects::AbstractState::pixelStore
void pixelStore(gl::GLenum pname, gl::GLint param)
globjects::AbstractState::enable
virtual void enable(gl::GLenum capability)=0
globjects::AbstractState::stencilOpSeparate
void stencilOpSeparate(gl::GLenum face, gl::GLenum stencilFail, gl::GLenum depthFail, gl::GLenum depthPass)
globjects::AbstractState::pixelStore
void pixelStore(gl::GLenum pname, gl::GLfloat param)
globjects::AbstractState::stencilMask
void stencilMask(gl::GLuint mask)
globjects::AbstractState::depthMask
void depthMask(gl::GLboolean flag)
globjects::AbstractState::add
virtual void add(StateSetting *setting)=0
globjects::AbstractState::isEnabled
virtual bool isEnabled(gl::GLenum capability, int index) const =0
globjects::AbstractState::setEnabled
void setEnabled(gl::GLenum capability, int index, bool enabled)
globjects::AbstractState::sampleCoverage
void sampleCoverage(gl::GLfloat value, gl::GLboolean invert)
globjects::AbstractState::cullFace
void cullFace(gl::GLenum mode)
globjects::AbstractState::colorMask
void colorMask(const std::array< gl::GLboolean, 4 > &mask)
globjects::AbstractState::enable
virtual void enable(gl::GLenum capability, int index)=0
globjects::AbstractState::blendFunc
void blendFunc(gl::GLenum sFactor, gl::GLenum dFactor)
globjects::AbstractState::clearColor
void clearColor(gl::GLfloat red, gl::GLfloat green, gl::GLfloat blue, gl::GLfloat alpha)
globjects::AbstractState::colorMask
void colorMask(gl::GLboolean red, gl::GLboolean green, gl::GLboolean blue, gl::GLboolean alpha)
globjects::AbstractState::polygonMode
void polygonMode(gl::GLenum face, gl::GLenum mode)
globjects::AbstractState::blendColor
void blendColor(gl::GLfloat red, gl::GLfloat green, gl::GLfloat blue, gl::GLfloat alpha)
globjects::AbstractState::setEnabled
void setEnabled(gl::GLenum capability, bool enabled)
globjects::StateSetting
Definition StateSetting.h:37
globjects
Contains all the classes that wrap OpenGL functionality.