Hello guys. I'm implementing a path algorithm like the one used in Flight Control. So far the end result looks very good (visually speaking). The problem is that I am using CCSprite to draw the actual lines instead of applying a texture to a polygon (as advised in several places around the net).
I just wanted something quick so I could see the results on screen and using Sprites allowed me to avoid the OpenGL intricacies.
But I have this feeling that using Sprites for that is not the right approach. It feels like overkill. But in case I don't have the time to learn OpenGL and decide to stick with Sprites is there anything I should be aware of? There could be a lot of sprites at one point on screen, depending how complex is the path the user has traced.
On the same note, isn't CCTexture2D supposed to work "out of the box"? The documentation for the drawRect method says "draws a texture inside a rect". I tried the following code and it gave me a BAD_ACCESS.
CCTexture2D *texture = [[CCTextureCache sharedTextureCache] addImage: @"path_texture.png"];
[texture drawInRect:CGRectMake(100, 100, 50, 50)];
I got the same error while trying to use OpenGL directly, following some tutorials over the net.
Any help appreciated.