I'm using openGL ES in my iphone project, and want to use
glVertexPointer, which requires an array of some number type that will be vertices. I need to declare this array dynamically because it can vary in size (I assume based on C/C++ experience) and came up with this:
Code:
...
GLfloat* lines;
lines = new GLfloat[ [touchArray count]*2 ]
//touchArray is just a NSMutableArray, nothing weird there.
...
But objective-C doesn't like it when I say "new"

. GLfloat is just a typedef of float, so it isn't an object... and I'm completely lost when it comes to this. I previously wrapped a struct into an NSObject subclass just so I didn't have to ask this question, but I think it's time to get past this stumble.
How do I allocate memory to these simple data types? Or otherwise how do I make that pointer to a struct or pointer to an array?