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

iOS - ofTexture.loadScreenData issue when antiAliasing is on #822

Closed
momo-the-monster opened this issue Nov 28, 2011 · 9 comments · May be fixed by #1909
Closed

iOS - ofTexture.loadScreenData issue when antiAliasing is on #822

momo-the-monster opened this issue Nov 28, 2011 · 9 comments · May be fixed by #1909

Comments

@momo-the-monster
Copy link

If I use loadScreenData with anti-Aliasing turned on in the program's startup like this:

ofAppiPhoneWindow * iOSWindow = new ofAppiPhoneWindow();
iOSWindow->enableAntiAliasing(4);

then the texture will load in nothing but solid black. If I bypass this anti-aliasing, it works fine. I also cannot properly populate a texture using loadScreenData in a landscape orientation. Changing to Portrait orientation in the update loop, and then back to landscape after the grab fixes it.

@ghost ghost assigned julapy Mar 9, 2012
@julapy
Copy link
Member

julapy commented Mar 9, 2012

this post looks like it may have the solution,
http:https://stackoverflow.com/questions/6869577/reading-data-using-glreadpixel
will try to implement it.

regarding screenGrab and landscape orientation, this issue was resolved in #135

@CoderBounty
Copy link

A bounty has been placed on this issue, check it out at Coder Bounty! http:https://coderbounty.com/#23

@momo-the-monster
Copy link
Author

I've added a $100 bounty for this issue via coderbounty.com. I'd really love to get screengrabs working with antiAliasing enabled.

@bilderbuchi
Copy link
Member

Great. :-)

I don't know if this will spark an influx of coders trying to fix this issue, but just in case:
If you read this, and are new/inexperienced with openFrameworks, make sure to follow the openFrameworks contributed code requirements laid out in the following wiki documents:
https://github.com/openframeworks/openFrameworks/wiki/openFrameworks-git-workflow
https://github.com/openframeworks/openFrameworks/wiki/openFrameworks-Coding-style-guidelines

Thank you!

@psytek
Copy link

psytek commented Apr 19, 2012

I added a bounty too - would love to see this get fixed. 5 days remaining.

@momo-the-monster
Copy link
Author

This issue is almost a year old now, I'd love to get it fixed. I couldn't do it on my own, anything I can do to help persuade?

@mcforman
Copy link

mcforman commented Mar 1, 2013

Hi, folks. I'm new here! But I've been helping out a friend with a related iOS openFrameworks issue (he couldn't get ofxiPhoneScreenGrab() to work with an antialiased display), and made decent progress.

My original fix worked well but was specific to ofxiPhoneScreenGrab() itself, with changes to it and the ofxiPhone 'gl' files - effectively wrapped glReadPixels() to set up the GL framebuffer objects correctly. However, this wouldn't help at all with ofTexture.loadScreenData(), or any other methods elsewhere that involve reading back from the framebuffer.

But.. I have a new, more general fix that I think will help with this issue - just need to make sure it doesn't break anything else. I've already checked through the examples and everything looks good so far, but would you guys mind looking over it to help with this? I've cloned the repo and I have a branch against develop ready to roll..

mcforman added a commit to mcforman/openFrameworks that referenced this issue Mar 3, 2013
…enframeworks#822; replaces commit 29e8034).

We're now setting display-mapped 'resolve' buffer (defaultFramebuffer) as current framebuffer after a draw, rather than the fsaa buffer. The fsaa buffer is set as current again before next draw.
@mcforman
Copy link

mcforman commented Mar 3, 2013

OK. Let's try that again..!

mcforman added a commit to mcforman/openFrameworks that referenced this issue Mar 9, 2013
…ntialiased framebuffer (fix openframeworks#822).

Wraps GL calls in ofTexture::loadScreenData() and ofxiPhoneScreenGrab() with correct buffer setup to work with iOS GLES-flavoured antialiasing.
@oxillo
Copy link
Contributor

oxillo commented Dec 26, 2019

Hi,

We are trying to clean out the many issues that we have.
Many versions of OF have been released since this was issued.

Can you help us by checking if this issue is still present in the latest version ?

In case of inactivity, we'll close this issue by end of january, 2020.

Thanks

@momo-the-monster momo-the-monster closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants