Created
December 16, 2010 23:13
-
-
Save kthakore/744192 to your computer and use it in GitHub Desktop.
SDL Video Surface using NativeCall perl6.
This file contains hidden or 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
#!perl6 | |
# Install NativeCall.pm from http://github.com/jnthn/zavolaj.git | |
# Copy libSDL-1.2.so or dll into local directory and | |
# perl6 SDL.pl :D | |
use v6; | |
use NativeCall; | |
class SDL_Surface is OpaquePointer; | |
sub SDL_SetVideoMode( Int $width, Int $height, Int $bpp, Int $flags ) | |
returns SDL_Surface | |
is native('libSDL') { } | |
sub SDL_Quit() | |
is native('libSDL') { } | |
my $foo = SDL_SetVideoMode( 200, 200, 32, 0); | |
sleep(2); | |
SDL_Quit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment