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

hack module to allow OpenGL::Image to seamlessly use OpenGL::Modern #54

Merged
merged 1 commit into from Apr 8, 2017

Conversation

wchristian
Copy link
Collaborator

I mentioned this yesterday and here it is. It is exceedingly simple.

It sets up a fake OpenGL namespace and blocks the %INC entry so it won't be overloaded by the real OpenGL.pm. Then it installs a barebones import method that simply rewrites it into an import on OpenGL::Modern, executed in the namespace of the caller. That way any import calls to the OpenGL namespace result in the import being done from OpenGL::Modern into the caller.

Only niggle is that OpenGL::Modern has no :constants, so i had to munge that into :all.

What do you think?

@wchristian wchristian force-pushed the image_hack branch 2 times, most recently from d0b546b to b12905b Compare March 5, 2017 16:55
@devel-chm
Copy link
Collaborator

Seems reasonable. Maybe it make sense to add :constants to OpenGL::Modern?

@wchristian
Copy link
Collaborator Author

For backwards compatibility, absolutely.

@devel-chm devel-chm merged commit c9bb77f into master Apr 8, 2017
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.

None yet

2 participants