Selecting just the retina simulator from the settings of the iosSimulator is not good enough
yes Images don’t always a appear 100% correctly on the simulators.
but what you are trying to do looks fine on my simulators and it should look the same in yours as well (if you did it correctly):
This is an example of a non retina screen loading an image with dimensions 400x400 and drawing it using .draw(0,0) without specifying dimensions or scaling it up:
retina screen loading an image with dimensions 800x800 and drawing it using draw(0,0) without specifying dimensions or scaling thins up or down:
actual image :
what do you mean by
“retina with the 2x resolution of 640x960(but with the screen dimensions as 320x480)”
? my simulator is a gigantic 640x960 ipadish looking simulator. is your laptop screen a retina screen?
it seems to me that you are unawarely using the non-retina , “retina” simulator, that has 640x960 size but 480x320resolution and you paste a 600x600 image scaling it down by drawing it to a pixel area of 300x300 . and then the simulator scales a blurred 300x300 image up to 600x600 . you are not pasting a 600x600 to a 640x960 area you are pasting at a 480x320 area that is then scaled up to 640x960 size by the non retina retina simulator
that was the only way I could recreate something similar to what you did
if you load a 600x600 and you paste it 300x300 it appears like that on the non retina simulator. and on the nonretina-retina it will appear like that scaled up by 2. like in your case.
non retina iphone is the simulator that runs on 480x320 resolution and 480x320size
retina simulator is the simulator that runs on 640x960 resolution and 640x960 size.
nontretina -retina simulator is the simulator that runs on 480x320 resolution but has a 640x960 size
the last two are the same simulator but I separated them here for you to make a point.
if you load a 600x600 image draw it on a 300x300 in a retina enabled area and then you scale it up using of scale by 2 to fit the 640x960 retina area then you are actually drawing it to the normal size and it appears fine even on the simulators. on the device it appears perfect.
but if you load a 600x600 shrink it to 300x300 to fit a 320x480 resolution area and then scale the blurry image up to a 640x960 size (not resolution) then it will appear exactly like that. pixelated and blurry
… note that if you don’t actually include an image Default@2x on the data folder and you don’t setup the code in the main.mm file to detect a retina screen your simulator and the device will run a standard 320x480 non retina window. the standard OF empty_example is not running on a retina screen you have to setup the project on x-code like I showed you on the example.
to test if you are using a true retina screen use the ofGetWidth() or ofGetScreenWidth() method provided by openFrameworks library to see what it returns. if it returns 960 it means that is retina if it’s 480 then you are actually running on a non retina resolution, therefore images will appear blurry.
just because you selected retina in the simulator it doesn’t mean that your code is “retina enabled”.