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

Added downloadBytes callback to RawDataOutput #30

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

Conversation

mikebikemusic
Copy link

Added downloadBytes callback to RawDataOutput, to make it symmetrical
with the uploadBytes method in RawDataInput.

Fixed bugs in the Luminance format for RawDataInput and RawDataOutput.

Added downloadBytes callback to RawDataOutput, to make it symmetrical
with the uploadBytes method in RawDataInput.

Fixed bugs in the Luminance format for RawDataInput and RawDataOutput.
framebuffer.unlock()

var data = [UInt8](count:Int(framebuffer.size.width * framebuffer.size.height * 4), repeatedValue:0)
glReadPixels(0, 0, framebuffer.size.width, framebuffer.size.height, GLenum(GL_RGBA), GLenum(GL_UNSIGNED_BYTE), &data)
renderFramebuffer.unlock()

dataAvailableCallback?(data)
if dataAvailableCallback != nil {
Copy link
Contributor

@zubco zubco Jun 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You already using optional chaining when calling dataAvailableCallback closure, so there is no need to check against nil value ;)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing these out. Creating another pull request.

rhx pushed a commit to rhx/GPUImage that referenced this pull request Oct 13, 2019
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.

2 participants