diff options
| author | Drew DeVault <sir@cmpwn.com> | 2021-12-09 14:36:32 +0100 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2021-12-09 14:36:32 +0100 |
| commit | 07046a3b2c2d0b6a5dfaaab70e5ea71e8334df1b (patch) | |
| tree | e134285c86f6052b9c19ae7755acafa0137e215b /sdl2/render.ha | |
| parent | Add README.md (diff) | |
| download | hare-chip8-07046a3b2c2d0b6a5dfaaab70e5ea71e8334df1b.tar.gz | |
sdl2::image: initial commit
Some additional things which were needed to make this work were also
added.
Diffstat (limited to '')
| -rw-r--r-- | sdl2/render.ha | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sdl2/render.ha b/sdl2/render.ha index e1d2c8e..d4f0671 100644 --- a/sdl2/render.ha +++ b/sdl2/render.ha @@ -68,3 +68,19 @@ export @symbol("SDL_RenderClear") fn render_clear(renderer: *renderer) int; // Update the screen with rendering performed. export @symbol("SDL_RenderPresent") fn render_present(renderer: *renderer) void; + +// Destroy the specified texture. +export @symbol("SDL_DestroyTexture") fn destroy_texture(texture: *texture) void; + +// Query the attributes of a texture +// +// Returns 0 on success, or -1 if the texture is not valid. +export @symbol("SDL_QueryTexture") fn query_texture(texture: *texture, + format: nullable *u32, access: nullable *int, + w: nullable *int, h: nullable *int) int; + +// Copy a portion of the texture to the current rendering target. +// +// Returns 0 on success, or -1 on error +export @symbol("SDL_RenderCopy") fn render_copy(renderer: *renderer, + texture: *texture, srcrect: nullable *rect, dstrect: nullable *rect) int; |
