TIZEN : Different Resolutions [ eglView->setFrameSize() ]

Hi, in Tizen project there is

CCEGLView* eglView = CCEGLView::sharedOpenGLView(); eglView->setFrameSize(1280, 720);

but tizen’s devices may have other resolutions

I haven’t yet tried it on the emulator but I think this is a problem. Is there any solution?

In Android project it’s different. Thanks.

(sorry for my english)

Hi Stefano,

I’ve found this problematic too and came up with this fix:

auto rect = OspApplication::GetInstance()->getOspForm()->GetBounds(); auto eglView = EGLView::getInstance(); eglView->setFrameSize(rect.width, rect.height);

I also tried this patch with various settings (480, 720 and physical) and it seems to work fine in all cases. Can you test this too? If you can confirm this solution I would create a pull request for this :slight_smile:

Hi Michael,

I did a quick test and it seems to work. I use cocos2d-x 2.2.0 then I used this code:

Tizen::Graphics::Rectangle rect = CCOspApplication::GetInstance()->getCCOspForm()->GetBounds(); CCEGLView* eglView = CCEGLView::sharedOpenGLView(); eglView->setFrameSize(rect.width, rect.height);

Thanks :smiley:

Hi Michael,

Have you also tested if the touch coordinates are right with this fix? They seem to not work properly. I use a fixed DesignResolutionSize (800x480).

I’m not at home, I can not give you other useful information.

I solved (maybe) with
eglView->setFrameSize(rect.height, rect.width);

and in manifest.xml change UiScalability with
<UiScalability CoordinateSystem="Physical"/>

Hi Stefano,

oh, yes. The physical coordinate system is important and what I’ve changed too. Sorry that I missed this in my post previously :confused: