private void RenderManipulators(GUILayer.SimpleRenderingContext context, DesignView designView) { var mani = designView.Manipulator; if (mani == null) { return; } var extra = mani as IManipulatorExtra; var clearBeforeDraw = (extra != null) ? extra.ClearBeforeDraw() : true; if (clearBeforeDraw) { // disable depth write and depth read context.InitState(false, false); } mani.Render(context, this); }
/// <summary> /// Sets render flags used for basic drawing.</summary> public static void SetRendererFlag(GUILayer.SimpleRenderingContext context, BasicRendererFlags renderFlags) { context.InitState( (renderFlags & BasicRendererFlags.DisableDepthTest) == 0, (renderFlags & BasicRendererFlags.DisableDepthWrite) == 0); }