2 ms·
This appears to be a peculiarity of the OpenGL headers - GL_ARRAY_BUFFER is just a #define: #define GL_ARRAY_BUFFER 0x8892 Instead of a proper constant. T
by cballard 11y ago
This appears to be a peculiarity of the OpenGL headers - GL_ARRAY_BUFFER is just a #define:
#define GL_ARRAY_BUFFER 0x8892
Instead of a proper constant. Therefore, Swift interprets it as an integer, which is fairly reasonable. GLEnum is:
typedef uint32_t GLenum;
Which is not compatible with Int in Swift, thus the "cast".
If GL_ARRAY_BUFFER was:
extern GLenum GL_ARRAY_BUFFER;
It would work as expected.