Skip to content

Commit

Permalink
Also adding texture. WIP #2
Browse files Browse the repository at this point in the history
  • Loading branch information
f0rodo committed Aug 9, 2013
1 parent 6cf5653 commit b430abb
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/Core/objects/Texture.xs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "ppport.h"
#include "helper.h"

#ifndef aTHX_
#define aTHX_
#endif

#include <SDL2/SDL.h>

MODULE = SDL2::Texture PACKAGE = SDL2::Texture PREFIX = texture_


SDL_Texture *
texture_new (CLASS, renderer, format, access, w, h)
char* CLASS
SDL_Renderer* renderer
Uint32 format
int access
int w
int h
CODE:
RETVAL = SDL_CreateTexture(renderer, format, access, w, h);
OUTPUT:
RETVAL


void
texture_DESTROY(bag)
SV *bag
CODE:
objDESTROY(bag, safefree);

0 comments on commit b430abb

Please sign in to comment.