BradLarson / GPUImage2

GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing.
BSD 3-Clause "New" or "Revised" License
4.85k stars 605 forks source link

Incorrect Keys for EAGLDrawable drawableProperties #209

Open zteric42 opened 6 years ago

zteric42 commented 6 years ago

https://github.com/BradLarson/GPUImage2/blob/858b01fc2fd7d1e07a697e8dc6c3a119e4773ef1/framework/Source/iOS/RenderView.swift#L44

According to the Document,

/****/ / Keys for EAGLDrawable drawableProperties dictionary / / / / kEAGLDrawablePropertyRetainedBacking: / / Type: NSNumber (boolean) / / Legal Values: True/False / / Default Value: False / / Description: True if EAGLDrawable contents are retained after a / / call to presentRenderbuffer. False, if they are not / / / / kEAGLDrawablePropertyColorFormat: / / Type: NSString / / Legal Values: kEAGLColorFormat / / Default Value: kEAGLColorFormatRGBA8 / / Description: Format of pixels in renderbuffer */ /****/ public let kEAGLDrawablePropertyRetainedBacking: String public let kEAGLDrawablePropertyColorFormat: String

/****/ / Values for kEAGLDrawablePropertyColorFormat key / /****/ public let kEAGLColorFormatRGBA8: String public let kEAGLColorFormatRGB565: String @available(iOS 7.0, *) public let kEAGLColorFormatSRGBA8: String

where

eaglLayer.drawableProperties = [NSNumber(value:false): kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8: kEAGLDrawablePropertyColorFormat]

I think the keys and values just swapped