can we convert NSArray to c array. if not what alternatives are there.[suppose i need to feed the c array in opengl functions where the c array contains vertex pointer read
NSArray has a -getObjects:range: method for creating a C-array for a subrange of an array.
Example:
NSArray *someArray = /* .... */;
NSRange copyRange = NSMakeRange(0, [someArray count]);
id *cArray = malloc(sizeof(id *) * copyRange.length);
[someArray getObjects:cArray range:copyRange];
/* use cArray somewhere */
free(cArray);