Hey,
I have a question regarding your code for loading textures.
- (void)loadTexture

NSString *)name intoLocation

GLuint)location {....}
this is the method im refering to
Code:
CGContextRef textureContext = CGBitmapContextCreate(textureData, texWidth, texHeight, 8, texWidth * 4, CGImageGetColorSpace(textureImage),
kCGImageAlphaPremultipliedLast);
// This is code added
CGContextClearRect(textureContext, CGRectMake(0, 0, (float)texWidth, (float)texHeight));
CGContextDrawImage(textureContext, CGRectMake(0.0, 0.0, (float)texWidth, (float)texHeight), textureImage);
CGContextRelease(textureContext);
I had noticed that if i applied a block image to the texture, then apply an image thats not square, then around the outside of the last image the block texture would appear.
I used that line to stop the last texture being drawn behind the current one. (this works and fixes it)
But i noticed behind the image thats not a square it appears black. (for example a leg image takes up apart of the square and the rest is black around it (as a texture))
I was wondering how i could get the outside part of the texture transparent, so only the leg image would be applied and around it would be transparent. (so if i had a texture having two legs that doesnt move you could see between its legs)
(sorry if i made no sense),
Is there also a reason why you haven't used that line of code? Or am i being an idiot for using that and should be using something else?