Skip to content

Use RL_QUADS/RL_TRIANGLES for single-pixel drawing#2750

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
hatkidchan:master
Oct 11, 2022
Merged

Use RL_QUADS/RL_TRIANGLES for single-pixel drawing#2750
raysan5 merged 1 commit into
raysan5:masterfrom
hatkidchan:master

Conversation

@hatkidchan
Copy link
Copy Markdown
Contributor

Addresses problem mentioned in #2744 (comment) (in short: when drawing pixels using DrawPixel/DrawPixelV in camera mode, upscaled pixel becomes a line instead of bigger pixel).

Addresses problem mentioned in
raysan5#2744 (comment)
(in short: when drawing pixels using DrawPixel{,V} in camera mode,
upscaled pixel becomes a line instead of bigger pixel)
Comment thread src/rshapes.c
Comment thread src/rshapes.c
@hatkidchan
Copy link
Copy Markdown
Contributor Author

Test build was made on Linux, I don't really have a Windows machine on me anymore, so it'd be nice to check if it works here. Though I doubt that it'd be much different.

Comparison between old and new versions (colors were added to differentiate between normal and camera view but other than that it's the same as in that issue comment):
Old code uses 1px long line which gets longer on camera zoom
New code uses 1px×1px rectangle which gets bigger on camera zoom as it should

@raysan5 raysan5 merged commit 8ebe62b into raysan5:master Oct 11, 2022
@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Oct 11, 2022

@hatkidchan Thank you very much for the review and the quick PR! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants