GL_EXTENSIONS and Swift

It can be useful during the development and debug of graphical code to check the OpenGL version or which extensions are available[1].

Swift being more type-sensitive than Objective-C, one sometimes needs to fiddle when combining it with OpenGL. First, enums defined in OpenGL headers will be considered as Int32, not as GLenum, so you'll have to cast them before calling any GL function.

Furthermore, when calling glGetString you have to manually handle the pointer, as glGetString returns a pointer to an array of UInt8 (ASCII string), whereas Swift necessarily expects a Int8 array when manipulating C-Strings. With no possible direct conversion from UnsafePointer<UInt8> to UnsafePointer<Int8>, you'll have to extract each character.