CEGUI X-Plane integration - coordinate system

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Rhard
Just popping in
Just popping in
Posts: 2
Joined: Sat Aug 24, 2013 08:18

CEGUI X-Plane integration - coordinate system

Postby Rhard » Sun Sep 27, 2015 11:49

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.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: CEGUI X-Plane integration - coordinate system

Postby Ident » Sun Sep 27, 2015 16:38

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.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 34 guests