aboutsummaryrefslogtreecommitdiffstats
path: root/src/sdl_texture.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-04-07 21:23:36 +0200
committerLoïc Hoguin <[email protected]>2014-04-07 21:23:36 +0200
commit581fcdd640b918055c06bb9f96ae8a098cb340f7 (patch)
tree14d98e2cf7b724afbb98a5de34096c6f23cdb7ce /src/sdl_texture.erl
parent333823ed12461420d48ea8c1e47743fe22eaf32f (diff)
downloadesdl2-581fcdd640b918055c06bb9f96ae8a098cb340f7.tar.gz
esdl2-581fcdd640b918055c06bb9f96ae8a098cb340f7.tar.bz2
esdl2-581fcdd640b918055c06bb9f96ae8a098cb340f7.zip
Add sdl_texture:get_color_mod/1
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 fa29d96..4412884 100644
--- a/src/sdl_texture.erl
+++ b/src/sdl_texture.erl
@@ -18,6 +18,7 @@
-export([create_from_surface/2]).
-export([get_alpha_mod/1]).
-export([get_blend_mode/1]).
+-export([get_color_mod/1]).
create_from_file(Renderer, Filename) ->
{ok, Surface} = sdl_surface:load(Filename),
@@ -40,3 +41,10 @@ get_blend_mode(Texture) ->
{ok, Alpha} = Ret,
Alpha
end.
+
+get_color_mod(Texture) ->
+ esdl2:get_texture_color_mod(Texture),
+ receive {'_nif_thread_ret_', Ret} ->
+ {ok, Alpha} = Ret,
+ Alpha
+ end.