Hacker News new | ask | show | jobs
by frank2 2232 days ago
Interesting. Do you know any software whose source code is available that uses such an abstraction to paint the screen?
1 comments

Any classic Windows, MacOS or GTK application does that.

Check https://docs.microsoft.com/en-us/windows/win32/learnwin32/pa...

If your question is about unified wrapper for multiple platforms then wxWidgets will qualify : https://wiki.wxwidgets.org/Painting_your_custom_control

As my Sciter where I wrapped Direct2D/DirectX, Skia/OpenGL, CoreGraphics, Cairo, GDI+ into class graphics abstraction so rest of code is isolated from particular paltform/backend used: https://github.com/c-smile/sciter-sdk/blob/master/include/be...