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

Read front buffer with getPixel #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

robf42
Copy link

@robf42 robf42 commented Feb 20, 2014

I've reversed the logic in drawPixel and pointed it at the front buffer rather than the back, so that what's being displayed can be queried. I've been wanting this ability so that I can write a proper Life implementation without having to keep another set of frame buffers (which there just is not enough memory for).

@Scott216
Copy link

So does this mean you don't need a 512 or 1024 byte buffer, you can just "stream" the data to the display? If so, is there an example sketch that uses the frontBuffer method?

@robf42
Copy link
Author

robf42 commented Mar 19, 2014

This doesn't change the buffer requirements of the library itself. It adds a method of reading pixels from the front buffer. Reading from the front buffer in order to determine what to write to the back buffer is what I've needed. I can't post any code right now as I'm traveling, but I'll post some next week.

I haven't used the frontBuffer method except in the test program I used to make sure getPixel was working correctly. I'll post that next week also.

@PlasticLizard
Copy link

Save me a ton of time, thanks!

@rfugina
Copy link

rfugina commented Sep 19, 2014

Glad it's been helpful. FYI, I've moved the forked repo to another account, but the pull request still stands...

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

Successfully merging this pull request may close these issues.

4 participants