Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D camera immediate GUI avoid flipping textures #29

Open
deuxcents opened this issue May 16, 2021 · 0 comments
Open

2D camera immediate GUI avoid flipping textures #29

deuxcents opened this issue May 16, 2021 · 0 comments

Comments

@deuxcents
Copy link

deuxcents commented May 16, 2021

Hello,

On 2D camera you have decided to set the origin at the top left of the screen which is fine (screen coordinates). Some comment in the code would be nice: set a screen coordinate system in pixel - i will open a separate token regarding dpi handling in windows.
Can you please store in gs_immediate_draw_t the fact that y axis is reversed and passing that info to the fragment shader in a new uniform ? That way the user does not have to do it on his side before hand. See pull request #31 for this proposed implementation.

Also:
GS_API_DECL void gsi_rect(gs_immediate_draw_t* gsi, float x0, float y0, float x1, float y1, uint8_t r, uint8_t g, uint8_t b, uint8_t a, gs_graphics_primitive_type type);

Should be (wrong variable names):
GS_API_DECL void gsi_rect(gs_immediate_draw_t* gsi, float l, float b, float r, float t, uint8_t r, uint8_t g, uint8_t b, uint8_t a, gs_graphics_primitive_type type);

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant