Hmm.. ok, making some progress, but not quite what i'd hoped.
I've got a background/scenery image (currently a Sprite, but soon to be a tilemap).
When I create this sprite, I use:
UIImage *scenery = [UIImage imageNamed:@"scenerylayer.png"];
_sceneryTexture = [[CCMutableTexture2D alloc] initWithImage:scenery];
_scenerylayer = [CCSprite spriteWithTexture:_sceneryTexture];
Which is all fine and dandy.
Later, when I want to draw a pixel onto the background, I do this:
ccColor4B black = ccc4(0,0,0,1);
[_sceneryTexture setPixelAt:[_ship getSprite].position rgba: black];
_scenerylayer.dirty = YES;
I was hoping this would draw a black pixel at the position of my _ship actor, but the scenery doesn't change.
I also tried [_sceneryTexture fill:black] in case it was some kind of coordinate mismatch, but still nothing changes.
Can anyone see anything obviously wrong here? Any help most appreciated!