12#ifndef RENDERSTATE_H_6014714286
13#define RENDERSTATE_H_6014714286
15#include <Carna/Carna.h>
91 const std::unique_ptr< Details > pimpl;
200 void commitDepthTest()
const;
202 void commitDepthWrite()
const;
204 void commitDepthTestFunction()
const;
206 void commitBlend()
const;
208 void commitBlendFunction()
const;
210 void commitBlendEquation()
const;
212 void commitCullFace()
const;
214 void commitFrontFace()
const;
216 void commitPointSize()
const;
Represents an association.
Defines how alpha blending is to be performed.
Wraps and represents an OpenGL context.
Manages the OpenGL render state.
CullFace
Lists supported face culling modes.
@ cullNone
All polygons will pass the cull test.
@ cullBack
Polygons recognized as back-faces will be discarded.
void commit() const
Commits the full state. For internal usage only.
RenderState()
Derives new render state from the current one of the current OpenGL context.
RenderState(GLContext &glContext)
Creates the root instance of glContext. For internal usage only.
void setBlendFunction(const BlendFunction &bf)
Configures how alpha blending is to be done. Alpha blending only applies if it is activated....
void setDepthWrite(bool dw)
Enables or disables depth writing.
void setDepthTestFunction(int dtf)
Configures how the depth test is to be performed. Depth test only applies if it is activated....
~RenderState()
Restores previous render state.
void setCullFace(CullFace cf)
Configures face culling. Also see setFrontFace.
void setFrontFace(bool ccw)
Sets whether front faces are winded contra-clockwise. Also see setCullFace.
void setBlend(bool b)
Enables or disables alpha blending. Alpha blending is configured through setBlendFunction and setBlen...
void setPointSize(float pointSize)
Sets glPointSize to pointSize if point size is non-negative. Enables GL_PROGRAM_POINT_SIZE and leaves...
void setDepthTest(bool dt)
Enables or disables depth testing.
void setBlendEquation(int be)
Sets glBlendEquation to be.
#define NON_COPYABLE
Features class it is placed in as non-copyable.