logoalt Hacker News

Lerclast Thursday at 10:36 PM3 repliesview on HN

I have done this on a number of platforms over the years. Going back to before createDIBSection existed (In fact I had something break when Windows provided an easy path and took away the method I had been using).

Linux has always been a weird kettle of fish, the thing that worked best for me was imlib2 which was originally part of enlightenment. It did what it was supposed to do, hid pixel format conversion without killing performance.

I'm not sure what would serve a similar function today,

If anyone knows of a library that takes a rectangle of memory, a pixel format and places it onscreen regardless of the display environment I'd like to hear about it.

The faster and more efficient, the better. More features than needed, worse.


Replies

pjmlpyesterday at 6:49 AM

Before those days, the solution would be to make use of WinG, the DirectX precursor, still introduced in Windows 3.0

https://www.gamedeveloper.com/programming/a-whirlwind-tour-o...

https://betawiki.net/wiki/WinG

stevekempyesterday at 6:38 AM

https://zserge.com/posts/fenster/ is what I used when I wanted "basic graphics" in a cross-platform way.

But of course that's X11 and much simpler.

show 1 reply
lelanthranyesterday at 5:09 AM

> If anyone knows of a library that takes a rectangle of memory, a pixel format and places it onscreen regardless of the display environment I'd like to hear about it.

I've used SDL for this in the past.