aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-04-02 14:09:18 +0200
committerLoïc Hoguin <[email protected]>2014-04-02 14:09:18 +0200
commit77d0e9d9ca8ed451a40f9b54f20365727ad76f5e (patch)
tree018650dcdf59e7976a1ae018754fd04d4a583ee0 /Makefile
parent608acbb03f976b0fbf23877d8b4b6ad7529e1d53 (diff)
downloadesdl2-77d0e9d9ca8ed451a40f9b54f20365727ad76f5e.tar.gz
esdl2-77d0e9d9ca8ed451a40f9b54f20365727ad76f5e.tar.bz2
esdl2-77d0e9d9ca8ed451a40f9b54f20365727ad76f5e.zip
Add a bullet engine example
A function sdl_renderer:set_logical_size/3 has been added. All the functions relative to the window, the renderer, textures and events now run in a separate thread inside the NIF. A few helper functions and macros have been added in order to abstract this out. The code reads like it is doing call or cast to the main thread. In the case of call, the result is then sent back to the calling process as a message (Erlang side catches it directly before returning). The functions relative to SDL init and surfaces have not been threaded yet. It may still be needed from the point of view of SDL or Erlang, but it seems to work fine as it is so they were left alone for now. The bullet example originally came from my submission to Spawnfest 2011, and has been reactualized to work with a modern Erlang, and SDL2.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d47278b..ed7c196 100644
--- a/Makefile
+++ b/Makefile
@@ -17,5 +17,5 @@ all:
mkdir -p ebin/
erlc -o ebin/ src/*.erl
cd c_src && make
- erlc -o examples/hello_sdl examples/hello_sdl/*.erl
- cd examples/hello_sdl && ./start.sh
+ erlc -o examples/bullet_engine examples/bullet_engine/*.erl
+ cd examples/bullet_engine && ./start.sh