Xcode-Beta (6D520o): Swift: OpenGL enums and functions are mapped improperly
| Originator: | owensd | ||
| Number: | rdar://19839585 | Date Originated: | 14-Feb-2015 08:47 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode-Beta (6D520o) |
| Classification: | Serious Bug | Reproducible: | Always |
The GLenum typealias is: typealias GLenum = UInt32
However, the enum values themselves are defined as Int32 values:
…
var GL_TEXTURE_BINDING_2D: Int32 { get }
var GL_TEXTURE_WIDTH: Int32 { get }
var GL_TEXTURE_HEIGHT: Int32 { get }
….
So when passing them into functions, like:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
Does not work. Instead, we have to cast the values:
glTexParameteri(UInt32(GL_TEXTURE_2D), UInt32(GL_TEXTURE_MIN_FILTER), GL_LINEAR);
That’s broken. Please fix.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!