Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphics implementation that writes to a pixel buffer #1096

Open
marshallpierce opened this issue Jan 9, 2018 · 7 comments
Open

Graphics implementation that writes to a pixel buffer #1096

marshallpierce opened this issue Jan 9, 2018 · 7 comments

Comments

@marshallpierce
Copy link

I needed this for getting turtle.rs running in the browser via webassembly, so I wrote up a partial implementation here: https://github.com/sunjay/turtle/pull/53/files#diff-1f72391b08b32f9b933c3e078f485e4d. It only does plain colors (not textures) because that's all Turtle needed.

Is this of interest? Maybe to #1070?

@bvssvni
Copy link
Member

bvssvni commented Jan 9, 2018

Yes, a software rasterizer backend is interesting.

@marshallpierce
Copy link
Author

OK. What would be a good way to contribute this? Are there conventions around testing, etc, that I should know about?

@bvssvni
Copy link
Member

bvssvni commented Jan 21, 2018

Can you separate it as a library?

@marshallpierce
Copy link
Author

It will be simple to pull out; it's just a single struct really, so that's no problem. Should I just PR that struct more or less as-is, or are there tests you'd like me to build as part of it?

@ischeinkman
Copy link

Any update on this? This would be really helpful for the Nintendo Homebrew community.

If not I can try making this myself, but if a crate already exists it would probably be easier to port than starting from scratch.

@marshallpierce
Copy link
Author

I haven't had time to touch it, but you could probably just hoist the implementation as-is out of that PR linked above and at least use it as a starting point.

@ischeinkman
Copy link

I have an implementation working at https://github.com/ischeinkman/framebuffer_graphics . It's basically just the code from the PR rearranged into multiple files and with some slight cleanups. It still doesn't have any texture support yet, but at the moment I am not sure what a texture would even mean in the context of a framebuffer; just a raw block of memory that acts as a sub-framebuffer for pasting into the true framebuffer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants