Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add module that allows OpenGL::Image to work with OpenGL::Modern dire…
…ctly (#54)
- Loading branch information
1 parent
88d0906
commit c9bb77f
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
requires 'Carp' => 0; | ||
requires 'Import::Into' => 0; | ||
|
||
on configure => sub { | ||
requires 'Capture::Tiny' => 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package # hide from cpan | ||
OpenGL; | ||
use strict; | ||
use warnings; | ||
use Import::Into; | ||
|
||
BEGIN { # prevent the real one from being loaded | ||
die "OpenGL already loaded" if $INC{"OpenGL.pm"}; | ||
$INC{"OpenGL.pm"} = "Loaded from OpenGL::Modern"; | ||
} | ||
|
||
sub import { | ||
my ( undef, @args ) = @_; | ||
$args[0] = ':all' if $args[0] eq ':constants'; # O::M doesn't have :constants yet | ||
my $target = caller; | ||
OpenGL::Modern->import::into( $target, @args ); | ||
} |