I have a shader that is stored in a string value:
var myShader = " attribute vec4 a_position;" + " void main() {" + " gl_Position = a_position;" + " }" glShaderSource(shader, GLsizei(1), myShader, nil)
The glShaderSource function has a binding signature:
func glShaderSource(shader: GLuint, count: GLsizei, string: UnsafePointer<UnsafePointer<GLchar>>, length: UnsafePointer<GLint>)
When I try to pass the shader string to the glShaderSource file, I get an error message:
'String' is not convertible to 'UnsafePointer<UnsafePointer<GLchar>>'
How to pass a string? (xCode Version 6.1 (6A1052d))
source share