From 07046a3b2c2d0b6a5dfaaab70e5ea71e8334df1b Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 9 Dec 2021 14:36:32 +0100 Subject: sdl2::image: initial commit Some additional things which were needed to make this work were also added. --- sdl2/render.ha | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sdl2/render.ha') 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; -- cgit v1.2.3