Skip to content

Instantly share code, notes, and snippets.

@kthakore
Created December 16, 2010 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kthakore/744192 to your computer and use it in GitHub Desktop.
Save kthakore/744192 to your computer and use it in GitHub Desktop.
SDL Video Surface using NativeCall perl6.
#!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