How do I convert this OpenGL pointer math to Swift?
I’m following this tutorial about OpenGL / GLKit for iOS but trying to implement it in Swift. It’s going fine until I get to this part: - (void)render { // 1 self.effect.texture2d0.name = self.textureInfo.name; self.effect.texture2d0.enabled = YES; // 2 [self.effect prepareToDraw]; // 3 glEnableVertexAttribArray(GLKVertexAttribPosition); glEnableVertexAttribArray(GLKVertexAttribTexCoord0); //---------------- This is where things break down... long offset = (long)&_quad; glVertexAttribPointer(GLKVertexAttribPosition, 2, GL_FLOAT, GL_FALSE, sizeof(TexturedVertex), (void *) (offset + offsetof