SDL_GPU minimal, single-header, high-performance 2D graphics painting library

Posted by n67094 4 days ago

Counter65Comment30OpenOriginal

Comments

Comment by kryptiskt 4 days ago

This isn't SDL_gpu, that is part of SDL3. This is SDL_gp, an external lib which builds on the former.

Comment by n67094 1 day ago

You are right, I made a typo ... :facepalm:

Comment by HexDecOctBin 4 days ago

How is this different from SDL_Render? https://wiki.libsdl.org/SDL3/CategoryRender

Comment by n67094 1 day ago

Thanks for the feedback you are right, this is necessary ! I'll do that asap :)

Comment by mwkaufma 3 days ago

If only there was some link to a readme which would answer this question.

Comment by n67094 1 day ago

I'll make sure to add that, thanks for the feedback.

Comment by HexDecOctBin 3 days ago

It doesn't.

Comment by nnevatie 4 days ago

The naming of the library is pretty confusing, considering SDL_gpu is an official part of SDL3.

Comment by feelamee 4 days ago

naming of api functions too. They all prepended with "SDL_" as if this is SDL library, but it not.

Comment by n67094 1 day ago

Well, I understand your concern, it's for naming consistency in codebases that may use this lib, like this one https://github.com/sabdul-khabir/SDL3_gfx, which is listed here https://wiki.libsdl.org/SDL3/Libraries (it's also an unofficial lib, like SDL_gp).

Comment by whateverboat 4 days ago

https://github.com/dascandy/pixel

I personally think this is better.

Comment by n67094 1 day ago

completely different under the hood, the one you sent use OpenGL only, SDL_gp use Vulkan, metal or DirectX depending on your system. There is also a lot of other diff but it will be long to explain ^^. But thanks I didn't know about the one you sent :)

Comment by mwkaufma 3 days ago

Why?

Comment by matt-p 4 days ago

Cool work!

Comment by n67094 1 day ago

thanks :)

Comment by torusle 4 days ago

Nice Ai prompting, bro..

Might want to share your harness /s

Comment by n67094 1 day ago

I "don't" use AI, I mean like most devs nowadays, I have a Copilot suggesting "smart" autocomplete, that's all. I wouldn't let an AI pilot my codebase. If you have a bit of probability knowledge, you may be aware of what happens when you're trying to get specific outputs from generic inputs.

And if you don't have a bit of probability knowledge: generic input just means high variance in the output, so "it looks right" isn't the same as "it is right." In other words, you'll just get a noisy sample out of many possible ones... and not what you really want.

Comment by andai 5 hours ago

This seems to point in the direction of a best-of-n approach?

Comment by andai 4 days ago

I know you're being sarcastic but I think some people may find this interesting:

https://minimal-agent.com/

I made one based on this tutorial (about 50 lines), which is about 8x faster and cheaper for small tasks in my experience. I highly recommend the learning experience.

Comment by bellowsgulch 4 days ago

[flagged]

Comment by tomhow 4 days ago

Please don't post like this on HN. The guidelines make it clear we're trying for something better here. https://news.ycombinator.com/newsguidelines.html

Comment by 3 days ago

Comment by andai 4 days ago

They who must must not be named actually get a decent income e-begging, they just got used to living in San Francisco.

Comment by qweqwe14 4 days ago

[flagged]

Comment by mightyham 4 days ago

Probably because they could easily have given the same advice without needing to call people on hn that encourage and support open source software "low-class".

Comment by unclad5968 4 days ago

> developers who get mad that you don’t give away all of your hard work for free

> encourage and support open source software

These two statements are not about the same group of people. It's reasonably safe to assume all people that get mad about proprietary software support OSS, but not all supporters of OSS get mad when people sell their software.

Everything I do I license as public domain. I would also encourage OP to sell his software if he'd like to make money from it, albeit maybe some different software.

Comment by mightyham 4 days ago

When the GP says "You’ll talk to a whole lot of low class people like that on HN", I interpret that as them disparaging basically anyone who supports open source, since I believe there are not many people on HN that are overly emotional about the existence of closed source software.

Comment by 4 days ago

Comment by krapp 4 days ago

>Why the downvotes?

Probably for calling open source developers sad low-class beggars. Also probably for the presumption that OP should be trying to hustle an income from a fork of an open source project that no one would be willing to pay for anyway, because there's no market for 2d renderers. They're all already free.

It isn't only crass, it's stupid and crass.

Comment by jmull 4 days ago

Eh, you might want to know what you’re talking about before calling people stupid. E.g., OP says with their repo, “ Hi everyone, I'm nsix, an indie game developer and open source contributor trying to make a living from my work.”

Perhaps the previous poster isn’t presuming, and simply read the repo landing page.

Not to mention, a plain reading of the comment makes it clear they are calling the people who “get mad that you don’t give away all of your hard work for free” low-class, and not open-source developers. And, of course, the people referred to a low-class are not the same as the ones referred to as begging.

I would assume you know these things and are intentionally trolling. Just calling out the insincere bad behavior for the sake of others who might get trolled by your comment.

Comment by isjsixjeidjei 4 days ago

[flagged]

Comment by tomhow 4 days ago

Please don't reply to a bad comment with another bad comment. Personal attacks are never ok here. You could easily respond by engaging with the substance of their comment rather than ad hominem. https://news.ycombinator.com/newsguidelines.html