Hi all, I’m developing app relying on design resolution vs screen resolution paradigm to support multiple resolutions.
I’ve noticed if I attempt to use
CCSprite* CCSprite::create(const char *pszFileName, const CCRect& rect) when scale factor not equal to 1 i.e.
CCDirector::sharedDirector()->getContentScaleFactor() != 1 sprite rect will scale accordingly, but texture will not.
I checked TestCpp project - same story. Please see attached images:
Normal resolution (normal480x320.png)
NSRect rect = NSMakeRect(200, 200, 480, 320); in AppController.mm and
scaled resolution (scale800x600.png)
NSRect rect = NSMakeRect(200, 200, 800, 600); in AppController.mm, notice how AtlasSprite, on the bottom, includes yellow and “grayish” versions of the texture whereas by design only “grayish” part must be displayed and scaled appropriately.
So my question is - is this bug, or there is another way of creating multiple sprites from single texture that will bypass this peculiarity?
P.S. I meant to attach normal480x320.png first so added “no issue” description, ended up attaching scale800x600 image first, so please disregard discrepancy, scale800x600.png is actually the one that has the issue.
scale800x600.png (79.6 KB)
normal480x320.png (46.6 KB)