15 #ifndef FPLBASE_DETAILED_RENDER_STATE_H
16 #define FPLBASE_DETAILED_RENDER_STATE_H
18 #include "fplbase/renderer_common.h"
36 RenderFunction
function;
39 AlphaTestState() : enabled(
false),
function(kRenderAlways), ref(0.0f) {}
55 kOneMinusConstantColor,
57 kOneMinusConstantAlpha,
63 BlendFactor src_alpha;
64 BlendFactor src_color;
65 BlendFactor dst_alpha;
66 BlendFactor dst_color;
77 enum CullFace { kFront, kBack, kFrontAndBack, kCount };
81 CullState() : face(kBack), enabled(
false) {}
85 RenderFunction
function;
88 DepthState() :
function(kRenderAlways), enabled(
false) {}
92 RenderFunction
function;
100 enum StencilOperations {
113 StencilOperations stencil_fail;
116 StencilOperations depth_fail;
120 StencilOperations pass;
156 return (lhs.enabled == rhs.enabled);
159 inline bool operator!=(
const ScissorState &lhs,
const ScissorState &rhs) {
160 return !(lhs == rhs);
163 inline bool operator==(
const StencilOperation &lhs,
164 const StencilOperation &rhs) {
165 return (lhs.stencil_fail == rhs.stencil_fail &&
166 lhs.depth_fail == rhs.depth_fail && lhs.pass == rhs.pass);
169 inline bool operator!=(
const StencilOperation &lhs,
170 const StencilOperation &rhs) {
171 return !(lhs == rhs);
174 inline bool operator==(
const StencilFunction &lhs,
const StencilFunction &rhs) {
175 return (lhs.function == rhs.function && lhs.ref == rhs.ref &&
176 lhs.mask == rhs.mask);
179 inline bool operator!=(
const StencilFunction &lhs,
const StencilFunction &rhs) {
180 return !(lhs == rhs);
183 inline bool operator==(
const StencilState &lhs,
const StencilState &rhs) {
184 return lhs.enabled == rhs.enabled && lhs.back_function == rhs.back_function &&
185 lhs.back_op == rhs.back_op &&
186 lhs.front_function == rhs.front_function &&
187 lhs.front_op == rhs.front_op;
190 inline bool operator!=(
const StencilState &lhs,
const StencilState &rhs) {
191 return !(lhs == rhs);
194 inline bool operator==(
const DepthState &lhs,
const DepthState &rhs) {
195 return lhs.enabled == rhs.enabled && lhs.function == rhs.function;
198 inline bool operator!=(
const DepthState &lhs,
const DepthState &rhs) {
199 return !(lhs == rhs);
202 inline bool operator==(
const CullState &lhs,
const CullState &rhs) {
203 return lhs.enabled == rhs.enabled && lhs.face == rhs.face;
206 inline bool operator!=(
const CullState &lhs,
const CullState &rhs) {
207 return !(lhs == rhs);
212 #endif // FPLBASE_INTERNAL_RENDER_STATE_H
Definition: detailed_render_state.h:34
Definition: detailed_render_state.h:142
Definition: detailed_render_state.h:99
Definition: detailed_render_state.h:84
Definition: detailed_render_state.h:91
Definition: detailed_render_state.h:76
Definition: detailed_render_state.h:125
Definition: detailed_render_state.h:136
mathfu::recti Viewport
Specifies the region of the surface to be used for rendering.
Definition: renderer_common.h:23
Definition: detailed_render_state.h:42