ios - CCTexture2D created texture.size not equal that image.size (only on iPad --> iPad simulator works fine) -
i have weird problem. when run code
cctexture2dmutable * texture = [[cctexture2dmutable alloc] initwithcgimage:image.cgimage resolutiontype: kccresolutionipadretinadisplay]; cgfloat heightofimage = image.size.height; cgfloat heightoftexture = texture.contentsize.height;
initwithcgimage mathod inherit cctexture2d. image <-- uiimage
i weird result:
on ipad simululator (works fine):
heightofimage = 1024
heightoftexture = 1024
on ipad (retina) (not equal???):
heightofimage = 1024
heightoftexture = 512
does 1 know why? drives me crazy.
if alter kccresolutionipadretinadisplay kccresolutionipad problem same.
cocos utilize points measurement, not pixels (anymore). that's why image size (in pixels) different texture size (in points)
ios ipad cocos2d-iphone
No comments:
Post a Comment