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

And glBitmap() and a few raster functions #74

Merged
merged 11 commits into from
Oct 6, 2024
Merged

Conversation

mardy
Copy link
Collaborator

@mardy mardy commented Oct 4, 2024

@mardy
Copy link
Collaborator Author

mardy commented Oct 6, 2024

This is now ready for review.

The tables themselves are unused, for the time being.
Very primitive and slow implementation, but working.
Add support for GL_UNPACK_SKIP_ROWS, GL_UNPACK_SKIP_PIXELS and
GL_UNPACK_ROW_LENGTH. The getter and setters for these options have been
added some time ago, but we hadn't made use of their values yet.
It's unclear why this function exists, given that all attributes are
booleans or integers, but let it be.
This will be used by glDrawPixels too.
Tested with the image.c example from Red Book 1.1:
https://www.opengl.org/archives/resources/code/samples/redbook/image.c

(just commented out the glCopyPixels() part, which is not implemented
yet)
The transformation was incorrect, because it was causing the row 0 and
the column 0 to fall outside of the screen: if we want the leftmost
column of screen pixels to show the scene pixels having coordinate 0,
then the left coordinate to guOrtho() must be -0.5, and in this way a
scene pixel having 0 as the x coordinate will be centered on the
leftmost pixel.

For the rightmost column the computation was correct (the value we pass
to guOrtho() must be 639.5, so we remove the -1 addend in order to
maintain the old value.
@WinterMute WinterMute merged commit 18604bc into devkitPro:master Oct 6, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants