public int getAttribLocation(WebGLProgram program, string name) { #if _DEBUG Log.Info(string.Format("getAttribLocation {0} {1}", program.Value, name)); #endif var chars = name.ToCharArray(); var bytes = new byte[chars.Length]; for (var i = 0; i < bytes.Length; i++) { bytes[i] = (byte)chars[i]; } var attribLocation = -1; unsafe { fixed(byte *b = &bytes[0]) { #if GLEW_STATIC attribLocation = Gl.glGetAttribLocation(program.Value, b); #else attribLocation = Gl.__glewGetAttribLocation(program.Value, b); #endif } } this.ErrorTest(); #if _DEBUG Log.Info(string.Format("value {0}", attribLocation)); #endif return(attribLocation); }