Cocos2D 의 texture 잡는 곳.
ccrendertexture.m
CCTexture2DPixelFormat format = kCCTexture2DPixelFormat_RGBA8888;
// textures must be power of two squared
int pow = 8;
while (pow < w || pow < h) pow*=2;
void *data = malloc((int)(pow * pow * 4));
memset(data, 0, (int)(pow * pow * 4));
texture_ = [[CCTexture2D alloc] initWithData:data pixelFormat:format pixelsWide:pow pixelsHigh:pow contentSize:CGSizeMake(w, h)];
댓글 없음:
댓글 쓰기