Page 1 of 1

CEGUI X-Plane integration - coordinate system

Posted: Sun Sep 27, 2015 11:49
by Rhard
Hi Team,

I have integrated CEGUI in X-Plane flight simulator (it was really a challenge :D ).
But since X-Plane 2D drawing uses left-bottom corner as zero position I need always to make y-position recalculations (for the mouse, callbacks etc.)

Is it a possibility to setup CEGUI to use bottom-left as zero point? Maybe some setup during build step? Or simplest way to change the source if possible?

Thanks.

Re: CEGUI X-Plane integration - coordinate system

Posted: Sun Sep 27, 2015 16:38
by Ident
This is not supported in the way you described. If it is just about drawing (wrapping the input really shouldn't pose a challenge anyways) then why can't you do it like we did with OpenGL Renderers and just flip ever quad vertically? There is an option for that somewhere I think it is called "isTexCoordSystemFlipped" (dont know the exact name in v0-8) or similar - I suggest to check how it is used. Afaik this is only used in the OpenGL Renderers, the other Renderers work the Direct3D way and assume the origin is top-left, just like CEGUI does.

If it works for OpenGL then why shouldn't it for X-Plane - in case I overlooked something tell me what I missed. For example, maybe this only works on a per-texture basis but not for the whole framebuffer. In that case you might wanna flip the framebuffer drawing as well.