Lines Matching defs:state
21 * \brief Shader - render state interaction case.
177 RenderState state;
221 gls::InteractionTestUtil::computeRandomRenderState(rnd, command.state, apiType, targetW, targetH);
224 static void setRenderState (sglr::Context& ctx, const RenderState& state)
226 if (state.scissorTestEnabled)
229 ctx.scissor(state.scissorRectangle.left, state.scissorRectangle.bottom,
230 state.scissorRectangle.width, state.scissorRectangle.height);
235 if (state.stencilTestEnabled)
242 const StencilState& sParams = state.stencil[face];
252 if (state.depthTestEnabled)
255 ctx.depthFunc(state.depthFunc);
256 ctx.depthMask(state.depthWriteMask ? GL_TRUE : GL_FALSE);
261 if (state.blendEnabled)
264 ctx.blendEquationSeparate(state.blendRGBState.equation, state.blendAState.equation);
265 ctx.blendFuncSeparate(state.blendRGBState.srcFunc, state.blendRGBState.dstFunc, state.blendAState.srcFunc, state.blendAState.dstFunc);
266 ctx.blendColor(state.blendColor.x(), state.blendColor.y(), state.blendColor.z(), state.blendColor.w());
271 if (state.ditherEnabled)
276 ctx.colorMask(state.colorMask[0] ? GL_TRUE : GL_FALSE,
277 state.colorMask[1] ? GL_TRUE : GL_FALSE,
278 state.colorMask[2] ? GL_TRUE : GL_FALSE,
279 state.colorMask[3] ? GL_TRUE : GL_FALSE);
307 setRenderState(ctx, cmd.state);