From 01a9d5eeb3e1e77239b5daef9895719f25bd9b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 7 Apr 2014 17:37:57 +0200 Subject: Add sdl_renderer:set_draw_blend_mode/2 --- src/esdl2.erl | 4 ++++ src/sdl_renderer.erl | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/esdl2.erl b/src/esdl2.erl index 2f7101d..5631512 100644 --- a/src/esdl2.erl +++ b/src/esdl2.erl @@ -79,6 +79,7 @@ -export([render_set_scale/3]). -export([render_set_viewport/5]). -export([render_target_supported/1]). +-export([set_render_draw_blend_mode/2]). -export([set_render_draw_color/5]). %% sdl_surface @@ -303,6 +304,9 @@ render_set_viewport(_, _, _, _, _) -> render_target_supported(_) -> erlang:nif_error({not_loaded, ?MODULE}). +set_render_draw_blend_mode(_, _) -> + erlang:nif_error({not_loaded, ?MODULE}). + set_render_draw_color(_, _, _, _, _) -> erlang:nif_error({not_loaded, ?MODULE}). diff --git a/src/sdl_renderer.erl b/src/sdl_renderer.erl index e6c6810..66117cb 100644 --- a/src/sdl_renderer.erl +++ b/src/sdl_renderer.erl @@ -43,6 +43,7 @@ -export([present/1]). -export([set_clip_rect/2]). -export([set_clip_rect/5]). +-export([set_draw_blend_mode/2]). -export([set_draw_color/5]). -export([set_logical_size/3]). -export([set_scale/3]). @@ -168,6 +169,10 @@ set_clip_rect(Renderer, X, Y, W, H) -> esdl2:render_set_clip_rect(Renderer, X, Y, W, H), receive {'_nif_thread_ret_', Ret} -> Ret end. +set_draw_blend_mode(Renderer, BlendMode) -> + esdl2:set_render_draw_blend_mode(Renderer, BlendMode), + receive {'_nif_thread_ret_', Ret} -> Ret end. + set_draw_color(Renderer, R, G, B, A) -> esdl2:set_render_draw_color(Renderer, R, G, B, A), receive {'_nif_thread_ret_', Ret} -> Ret end. -- cgit v1.2.3