Hello,
Apologies if this has been covered (I can't find a definitive answer when searching).
I have a problem, when trying to support the retina display in .99.4.
I create an EAGLView as per Riqs documentation and all seems well i.e
/
EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
pixelFormat:kEAGLColorFormatRGBA8
depthFormat:GL_DEPTH_COMPONENT24_OES
preserveBackbuffer:NO];
However....
I detect the hi-res screen by examining the UIScreen scale property. It correctly identifies as 1.0 for iPad and old gen iPhone and identifies as 2 for iPhone 4 hi-res. This all seems to work as expected and allows me to change my layout as required (and set the GLViews content scale factor).
The problem is that the Window bounds are still set to 320x480, this makes sense and is to be expected, however the problem occurs when I try and adjust the GLView bounds.
if I multiply the [window bounds] by the content scale factor before creating the GLView my content is displayed offset. it seems to be offset by 480px vertically. If I adjust the bounds to have an origin of 0,-480 then my content is perfectly scaled and displays correctly.
What am I doing wrong? Surely I shouldn't have to move the GLView frame origin? and if so why is it moved by exactly -1.f*screen.height?
Has anyone got this working on an actual device? I am only able to test in the simulator at the moment...
Thanks in advance.
