Closed bztsrc closed 1 year ago
Okay! Let me know if you need anything. This is a very simple change, does not provide alpha transparency on textures or anything, it just allows the format to be loaded.
Cheers, bzt
Thank you very much. It's very likely I'll accept it.
You're welcome! I guess I can close this issue now, but I'll keep looking at it should you have some questions.
I need to get around to it. I've been doing other things and not focusing on programming recently.
No need to hurry! Take your time.
have you tested the commits for yourself and made sure it doesn't adversely affect the demos?
Yes. BTW the version I'm actively using in production is here. It has some other modifications and cleanup as well (see the readme on the link, most notably that version compiles as ANSI C without warnings), and of course includes this components
parameter patch too. If you want, you can backport some of my other modifications as well.
Cheers, bzt
I think gl_resizeImageNoInterpolate
(image_util.c) should also be changed as follows, in keeping with the pattern of changing 3
to components
.
From: pix1 = pix_src + (yi * xsize_src + xi) * 3;
To: pix1 = pix_src + (yi * xsize_src + xi) * components;
Other than that, this is a really helpful addition to TinyGL, thanks!
Edit: Just noticed the repo you linked has the change, which is not in the diff above.
I think gl_resizeImageNoInterpolate (image_util.c) should also be changed as follows, in keeping with the pattern of changing 3 to components.
Absolutely. There's also a pix += components;
line.
Just noticed the repo you linked has the change, which is not in the diff above.
Ah, I'm terribly sorry. I had to manually construct the diff because I've changed so many things (for example made it ANSI C89), so gitdiff was huge, and included unnecessary things not related to this. Indeed I forget to include gl_resizeImageNoInterpolate
in the diff, mea culpa.
Other than that, this is a really helpful addition to TinyGL, thanks!
You're welcome! And I should be the one saying thanks for this TinyGL fork!
Cheers, bzt
Oh, I'm not a contributer, just someone interested in using this fork and some of your changes in an upcoming project.
Just wanted to make sure: the GPL 3 license of your project does not apply to your modifications to TinyGL, right?
On Mon, Nov 28, 2022, 11:13 AM Zoltan Baldaszti @.***> wrote:
I think gl_resizeImageNoInterpolate (image_util.c) should also be changed as follows, in keeping with the pattern of changing 3 to components.
Absolutely. There's also a pix += components; line.
Just noticed the repo you linked has the change, which is not in the diff above.
Ah, I'm terribly sorry. I had to manually construct the diff because I've changed so many things (for example made it ANSI C89), so gitdiff was huge, and included unnecessary things not related to this. Indeed I forget to include gl_resizeImageNoInterpolate in the diff, mea culpa.
Other than that, this is a really helpful addition to TinyGL, thanks!
You're welcome! And I should be the one saying thanks for this TinyGL fork!
Cheers, bzt
— Reply to this email directly, view it on GitHub https://github.com/C-Chads/tinygl/issues/18#issuecomment-1329455349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATC57S74SVRAD6U4GTMKD3WKTR2HANCNFSM5LVX3F6A . You are receiving this because you commented.Message ID: @.***>
@williehwc:
Just wanted to make sure: the GPL 3 license of your project does not apply to your modifications to TinyGL, right?
I'm afraid they do (see GPL section 5c). That's why I've uploaded the diff here directly instead of just linking my GPL'd repo. To be clear, the patch in this issue is licensed under the same license as TinyGL's.
So as a rock-solid workaround, I've attached my entire TinyGL directory here (as soon as distributed separately, the GPL restrictions won't apply any more, this tarball is licensed as the original TinyGL, you're in the clear using this).
TinyGL.tgz (60k)
Cheers, bzt
Thank you, this is really useful!
it looks like you didn't make a PR, you just posted the issue?
Ah yes, sorry about that. git push
doesn't work for me on github lately (I have absolutely no issues with other sites, just with github, and it used to work here too. I haven't changed anything, but I'm upgrading my system regularly).
Cheers, bzt
Unrelated to this topic:
I would actually like to re-write TinyGL myself (Not using any of Bellard's code) so that I can make it CC0.
You have my permission to use my modifications to the TinyGL source as CC0, should you have use any of that with the rewrite.
However I'm not focused on other projects (Primarily related to CPU and system emulation and assemblers) so I probably don't have time for it.
Cool! Here's a Universal Disassember if you're interested. You provide the instruction set of an architecture in a text file and the script outputs a single header, MIT licensed C library, which in turn then can disassemble binaries for that architecture with a single function call.
Cheers, bzt
Github has been fussy about needing SSH keys to do everything. If you switch to SSH keys from https, it should work.
It's not like that, I know how to use SSH keys. For example, last week I was locked out entirely from the site, as github said verification code sent in email, but the email never arrived... only a week later. And things like that, there's always something not working for me on github. I've simply given up with its git interface, because there are much better alternatives.
I have already written a disassembler, debugger, macro assembler, a system library, and an operating system in for the instruction set I am working on. It's all public domain
Yes, I've seen that, pretty cool!
Cheers, bzt
Hi!
Pretty awesome additions you have made to TinyGL! I really like it! My only issue is, I procedurally generate textures with uint32_t pixels and I cannot load that. So I've added this little patch to support GL_RGBA textures (it does not do anything with the alpha channel, it just allows to load pixel buffers with uint32_t pixels).
Basically it adds a
components
parameter to the image_util.c functions and uses that instead of the hardcoded 3:Cheers, bzt