I am currently using cocos2dx. My testing device is ipad2 i want my sprite size to be independent of texture size because i cant afford one to one mapping. here is the example suppose i have a texture whose dimensions are 1024,1024 i want to use only portion of it from 0,0 to 300,300 i want that sprite to draw from 100,100 to 200,200 how can i acheive this
i have tried setting quad manualy but its giving a weird behaviour my quad vertices are
quad.bl.vertices = 0,0
quad.br.vertices = 1024,0
quad.tr.vertices = 1024,1024
quad.tl.vertices = 0,1024
nothing is displayed on screen
but when i change them to
quad.bl.vertices = 0,0
quad.br.vertices = 2048,0
quad.tr.vertices = 2048,2048
quad.tl.vertices = 0,2048
then portion of sprite is displayed on screen. after changing the vertices a bit it seems as if coocs 2d is assuming that the bottom left corner of ipad is at 1024, 1024 regards