Additional Sample - Minimal Win32 HWND Software Render #1908
ShadowMarker789
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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