const VertexSetup *get_vertex_setup() const { return vertex_setup; }
FaceWinding get_front_face() const { return front_face; }
CullMode get_face_cull() const { return face_cull; }
+ const DepthTest &get_depth_test() const { return depth_test; }
+ const StencilTest &get_stencil_test() const { return stencil_test; }
+ const Blend &get_blend() const { return blend; }
private:
void check_bound_resources() const;
void Renderer::clear(const ClearValue *values)
{
apply_framebuffer();
- commands.use_pipeline(&get_pipeline_state());
+ PipelineState &ps = get_pipeline_state();
+ if(!ps.get_depth_test().write)
+ ps.set_depth_test(DepthTest());
+ if(!ps.get_blend().write_mask)
+ ps.set_blend(Blend());
+ commands.use_pipeline(&ps);
commands.clear(values);
}