public void End() { if (!BatchBegan) { throw new System.Exception("Call Batch Begin"); } Flush(); CurrentMaterial.End(); UnBindBuffers(); BatchBegan = false; }
public void Finish() { if (CurrentMaterial != null) { CurrentMaterial.End(this); CurrentMaterial = null; } RenderManager.ResetDeviceState(Device); Device.SetRenderTargets(); Device.SetVertexBuffer(null); }
public void Finish() { if (CurrentMaterial != null) { CurrentMaterial.End(this); CurrentMaterial = null; } for (var i = 0; i < 4; i++) { Device.Textures[i] = null; } Device.SetRenderTargets(); Device.SetVertexBuffer(null); }
public void Finish() { if (CurrentMaterial != null) { CurrentMaterial.End(this); CurrentMaterial = null; } RenderManager.ResetDeviceState(Device); SetRenderTargets(null, isPushPop: true); Device.SetVertexBuffer(null); #if DEBUG int threshold = 2; if (BatchGroupStack.Count >= threshold) { throw new Exception("Unbalanced batch group stack"); } if (RenderTargetStack.Count >= threshold) { throw new Exception("Unbalanced render target stack"); } if (BlendStateStack.Count >= threshold) { throw new Exception("Unbalanced blend state stack"); } if (RasterizerStateStack.Count >= threshold) { throw new Exception("Unbalanced rasterizer state stack"); } if (DepthStencilStateStack.Count >= threshold) { throw new Exception("Unbalanced depth/stencil state stack"); } #endif BatchGroupStack.Clear(); RenderTargetStack.Clear(); BlendStateStack.Clear(); RasterizerStateStack.Clear(); DepthStencilStateStack.Clear(); }
public override void OnDelete(bool softDelete) { Msg msg = CurrentMaterial.DeleteACObject(DatabaseApp, true, softDelete); if (msg != null) { Root.Messages.Msg(msg); return; } _IsLoadDisabled = true; if (AccessPrimary == null) { return; } AccessPrimary.NavList.Remove(CurrentMaterial); SelectedMaterial = AccessPrimary.NavList.FirstOrDefault(); PostExecute("Delete"); _IsLoadDisabled = false; Load(); OnPropertyChanged("MaterialList"); }
public void SwapToOriginal() { meshRenderer.material = originalMaterial; currentMaterial = CurrentMaterial.ORIGINAL; }
public void SwapToOutlineSelected() { meshRenderer.material = outlineSelectedMaterial; currentMaterial = CurrentMaterial.OUTLINE_SELECTED; }
public void SwapToOutline() { meshRenderer.material = outlineMaterial; currentMaterial = CurrentMaterial.OUTLINE; }