public void Render() { swapChainManager.EnsureMatchesWindow(window); // Update the accumulation buffer SwapAccumulationBuffers(); EnsureCurrentBufferMatchesWindow(); using (var geom = MakeGeometryForContactPoints()) { using (var ds = FrontBuffer.CreateDrawingSession()) { ds.Clear(Colors.Transparent); AccumulateBackBufferOntoFrontBuffer(ds); DrawContactGeometry(ds, geom); } var swapChain = swapChainManager.SwapChain; using (var ds = swapChain.CreateDrawingSession(Colors.CornflowerBlue)) { ds.DrawImage(FrontBuffer); DrawFaceInCenterOfGeometry(ds, geom); DrawContactPoints(ds); DrawInfo(ds); DrawTitle(ds, swapChain.Size); } swapChain.Present(); } }
public void mergeUpdates(FrontBuffer otherBuffer) { foreach (var page in otherBuffer.updatedPages) { pixelBuffer.Value.blitFromMemory(page.pixelBox, page.destRect); } }
public void PreviewKeyDown() { if (CursorPosition < BackBuffer.LongCount()) { CursorPosition = FrontBuffer.LongCount() + 1; } }
private void createTexture() { frontBuffers = new FrontBuffer[2]; for (int i = 0; i < frontBuffers.Length; ++i) { frontBuffers[i] = new FrontBuffer(TextureManager.getInstance().createManual(String.Format("{0}_BackBuffer_{1}", textureName, i), VirtualTextureManager.ResourceGroup, TextureType.TEX_TYPE_2D, (uint)size.Width, (uint)size.Height, 1, 0, pixelFormat, virtualTextureManager.RendersystemSpecificTextureUsage, null, false, 0)); } }