15#ifndef RENDERSTATE_H_6014714286
16#define RENDERSTATE_H_6014714286
94 const std::unique_ptr< Details > pimpl;
207 void commitDepthTest()
const;
209 void commitDepthWrite()
const;
211 void commitDepthTestFunction()
const;
213 void commitBlend()
const;
215 void commitBlendFunction()
const;
217 void commitBlendEquation()
const;
219 void commitCullFace()
const;
221 void commitFrontFace()
const;
223 void commitPointSize()
const;
225 void commitLineWidth()
const;
Contains forward-declarations.
Represents an association.
Defines how alpha blending is to be performed.
Wraps and represents an OpenGL context.
Manages the OpenGL render state.
void setDepthWrite(bool dw)
Enables or disables depth writing.
void commit() const
Commits the full state. For internal usage only.
void setBlendEquation(int be)
Sets glBlendEquation to be.
void setLineWidth(float lineWidth)
Sets glLineWidth to lineWidth if lineWidth is positive.
CullFace
Lists supported face culling modes.
@ cullNone
All polygons will pass the cull test.
@ cullBack
Polygons recognized as back-faces will be discarded.
void setCullFace(CullFace cf)
Configures face culling. Also see setFrontFace.
void setBlendFunction(const BlendFunction &bf)
Configures how alpha blending is to be done. Alpha blending only applies if it is activated....
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 setBlend(bool b)
Enables or disables alpha blending. Alpha blending is configured through setBlendFunction and setBlen...
~RenderState()
Restores previous render state.
void setDepthTest(bool dt)
Enables or disables depth testing.
void setFrontFace(bool ccw)
Sets whether front faces are winded contra-clockwise. Also see setCullFace.
void setDepthTestFunction(int dtf)
Configures how the depth test is to be performed. Depth test only applies if it is activated....
void setPointSize(float pointSize)
Sets glPointSize to pointSize if point size is non-negative. Enables GL_PROGRAM_POINT_SIZE and leaves...
Defines LibCarna::base::noncopyable and NON_COPYABLE.
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.