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

Separate image reading functions to separate file #1823

Closed

Conversation

JakeOShannessy
Copy link
Contributor

@JakeOShannessy JakeOShannessy commented Mar 3, 2024

Previously, the functions for reading images were in renderimage.c. This commit moves the to readimage.c. This means that the read image functions can be used without depending on GLUT and GLUI etc.

As such they can now live in the shared directory and be used by all programs. The code is unchanged with the exception of an additional parameter to replace a global.

Previously ReadPicture accessed a global variable "texturedir" meaning
that it couldn't be used outside of depending on global variables
(meaning it effectively depended on GLUT and GLUI).
Previously, the functions for reading images were in renderimage.c. This
commit moves the to readimage.c. While this is a cleaner logical
division, a more important difference is that the read image functions
can be used without depending on GLUT and GLUI (etc.).

As such they can now live in the shared directory and be used by all
programs.
@gforney
Copy link
Contributor

gforney commented Mar 5, 2024

jake, we are working on getting a new release out. I'll look at this PR after it is out. glenn

@JakeOShannessy
Copy link
Contributor Author

No worries Glenn. This is merely groundwork to get rid of some troublesome globals so there's no urgency to it.

@JakeOShannessy
Copy link
Contributor Author

I'll provide this in a different PR.

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