aboutsummaryrefslogtreecommitdiffstats
path: root/src/sdl_texture.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdl_texture.erl')
-rw-r--r--src/sdl_texture.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sdl_texture.erl b/src/sdl_texture.erl
index 276dce1..fa29d96 100644
--- a/src/sdl_texture.erl
+++ b/src/sdl_texture.erl
@@ -17,6 +17,7 @@
-export([create_from_file/2]).
-export([create_from_surface/2]).
-export([get_alpha_mod/1]).
+-export([get_blend_mode/1]).
create_from_file(Renderer, Filename) ->
{ok, Surface} = sdl_surface:load(Filename),
@@ -32,3 +33,10 @@ get_alpha_mod(Texture) ->
{ok, Alpha} = Ret,
Alpha
end.
+
+get_blend_mode(Texture) ->
+ esdl2:get_texture_blend_mode(Texture),
+ receive {'_nif_thread_ret_', Ret} ->
+ {ok, Alpha} = Ret,
+ Alpha
+ end.