When I enable Retiona on my iphone 4 and simulator coordinates is ok, but all image downscaled.
On win32 I notice same behavior.
When I enable Retiona on my iphone 4 and simulator coordinates is ok, but all image downscaled.
On win32 I notice same behavior.
Did you use retina resources?
And how did you name the resources?
I made screenshots.
The same situation on windows.
I made screenshots.
The same situation on windows.
What’s the resolution of you resources?
And could you paste some codes?
I understand that this happens if I use
pDirector->setProjection(kCCDirectorProjection2D)
If the HelloWorld insert:
pDirector->enableRetinaDisplay(true); pDirector->setProjection(kCCDirectorProjection2D);
You will see this bug
Thanks for your feedback, the issue #1297 was created.
You can fix this by hacking the code in CCDirector::setProjection
case kCCDirectorProjection2D:
{
kmGLMatrixMode(KM_GL_PROJECTION);
kmGLLoadIdentity();
kmMat4 orthoMatrix;
// size should div CC_CCONTENT_SCALE_FACTOR() in the next line.
kmMat4OrthographicProjection(&orthoMatrix, 0, size.width / CC_CONTENT_SCALE_FACTOR(), 0, size.height / CC_CONTENT_SCALE_FACTOR(), -1024, 1024 );
kmGLMultMatrix(&orthoMatrix);
kmGLMatrixMode(KM_GL_MODELVIEW);
kmGLLoadIdentity();
}
break;
Serg Merg wrote:
I understand that this happens if I use
>
pDirector->setProjection(kCCDirectorProjection2D)
>
If the HelloWorld insert:
>
pDirector->enableRetinaDisplay(true); pDirector->setProjection(kCCDirectorProjection2D);
>
You will see this bug
Thank you.
I already did it.
Everything works as it should.
Not everything =(
When I use CCRenderTexture sprite of this texture is 2x scaled;
If I used 3d projection CCRenderTexture work fine.
I made changes in CCRenderTexture::begin()
-glViewport(0, 0, (GLsizei)(texSize.width * CC_CONTENT_SCALE_FACTOR()), (GLsizei)(texSize.height * CC_CONTENT_SCALE_FACTOR()));
+glViewport(0, 0, (GLsizei)texSize.width, (GLsizei)texSize.height);
After that everything work, but I’m not sure that this will not affect anything else.
It has been fixed. Thanks.
Serg Merg wrote:
Not everything =(
>
When I use CCRenderTexture sprite of this texture is 2x scaled;
>
If I used 3d projection CCRenderTexture work fine.
>
I made changes in CCRenderTexture::begin()
>
[…]
>
After that everything work, but I’m not sure that this will not affect anything else.