Additional Sample - Minimal Win32 HWND Software Render #1908
ShadowMarker789
started this conversation in
Show and tell
Replies: 1 comment
-
A bit late I know - but I would love to see a sample for this, as I similarly have been trying to develop a non-XAML/retained/framework-based UI app in C# for a while now :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am hoping to make a lean GUI application in C# that doesn't rely on WinForms nor WPF. I would like to eventually use hardware acceleration when it's available.
Using TerraFX, I can construct a window using the native Win32 API calls in a performant way with little overhead.
I have an existing program that creates a Window, obtains a DrawingContext Handle (HDC) to that window, paints to an SKCanvas, and presents it on the screen using Win32 SetDIBitsToDevice. It draws a small little spinning black rectangle onto a gray canvas in the center of the window.
This correctly draws and presents to the screen. It doesn't use the GPU to accelerate its drawing operations.
I have produced a working example minimalistic program that constructs a Window, creates a SkiaSharp surface and updates the contents of the window from the SkiaSharp surface. All of this I have functioning right now.
Does a sample of Win32 integration between TerraFX and SkiaSharp sound interesting enough to put into the samples?
TerraFX-SkiaSharp-Example.mp4
Beta Was this translation helpful? Give feedback.
All reactions