[go: up one dir, main page]

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

C3D_SetScissor does not work as intended? #64

Open
TheGag96 opened this issue Dec 7, 2023 · 2 comments
Open

C3D_SetScissor does not work as intended? #64

TheGag96 opened this issue Dec 7, 2023 · 2 comments

Comments

@TheGag96
Copy link
TheGag96 commented Dec 7, 2023

The arguments to C3D_SetScissor after the first are left, right, top, bottom. Calling the function like this in the gpusprites example in the examples repo:

C3D_SetScissor(GPU_SCISSOR_NORMAL, 0, 0, 400, 240);

...yields:

image

...which is not what I would expect (a no-op in this case). It renders the same way on console. Is there a bug here?

@oreo639
Copy link
Contributor
oreo639 commented Dec 7, 2023

It does work as expected for me. The inputs are X1 Y1 for the start position (e.g. [0,0]) and X2 Y2 for the end position (e.g. [240,400] due to the orientation of the screen).
So for C3D_SetScissor(GPU_SCISSORMODE mode, u32 left, u32 top, u32 right, u32 bottom)
You would want: C3D_SetScissor(GPU_SCISSOR_NORMAL, 0, 0, 240, 400); or C3D_SetScissor(GPU_SCISSOR_NORMAL, 0, 400, 240, 0)

@TheGag96
Copy link
Author
TheGag96 commented Dec 7, 2023

Ah, gotcha... Might be worth a doc comment in the header.

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

2 participants