gecko0307 / dagon

3D game engine for D
https://gecko0307.github.io/dagon
Other
321 stars 30 forks source link

Port stb_image to D? #76

Closed gecko0307 closed 5 months ago

gecko0307 commented 2 years ago

It makes sence to port stb_image to D and thereby get rid of linking to a static library.

Obvious disadvantage is that changes from the original C version can't be easily applied to D version. So this is going to be a full-blown fork with serious discrepancies.

Eric-P7 commented 2 years ago

If you go that way, Walter Bright has an article on how to minimize the pain of converting C to D, if you haven't seen it already.

Out of curiosity, why did you stop using your own dlib.image?

gecko0307 commented 2 years ago

It turned out that stb is much faster. I haven't compared them in detail, perhaps dlib.image can be improved, so porting stb to D will be a step towards this goal.

gecko0307 commented 1 year ago

Thanks to recent optimization that makes dlib decoders perform not much worse than stb, this has lower priority now.

But stb is still useful to support progressive JPEG, so I'll keep the issue open.

gecko0307 commented 5 months ago

I've decided to close this as impractical and too labor-consuming. I'd rather add progressive JPEG support to dlib (though I have no idea when 🤪)