It is library that gives you access to SDL and
Opengl functionality
in your erlang program.
SDL handles 2d graphics, user events and audio while Opengl handles 3d graphics.
More information.
It should be able to run on any platform that Erlang, SDL and
Opengl runs on.
I have tested it with Solaris (Sun's opengl) and linux (mesa and nvidia).
and on windows (a precompiled version is available below).
Håkan Stenholm has provided a MacOsX makefile which is included in the source package.
I don't have access to an Mac so I can't test it but patches are welcomed.
Big thanks to David Wallin who has made a new MacOsX port
which works with newer SDL-versions.
Erlang R11B available at www.erlang.org
SDL-X > 1.2.10 available at www.libsdl.org
Opengl 1.1 supplied by your OS vendor, hardware manufacturer,
or Mesa the opengl software clone
available at www.mesa3d.org
Two issues on linux that keeps coming up is:
Esdl requires a complete GLU 1.2 implementation, on many distributions
a mesa variant is used, which misses the tesselator included in GLU 1.2.
Download the proper prebuilt sgi-version from www.mesa3d.org and click
on SGI-GLU link to find a rpm.
Using esdl with nvidia cards and their drivers requires that erlang
was built with threads.
i.e. when building erlang do ./configure -enable-threads
otherwise erlang will crash with a nice little segfault.
The latest src and a prebuilt windows version is here .
Not much the Readme and some generated documentation is included. In general the SDL and OPENGL documentation is applicable, special cases should be documented in the documentation.
Should be reported to me by e-mail dgud AT users.sourceforge.net or via Sourceforge.
For everything that you provide..
Check out Wings3d a 3d modeller written with esdl in erlang.
Wings3d also contains a package e3d which contains general 2d and 3d functions in erlang, such as vector/matrix functions and object/image loaders/savers. Download the wings3d src package.
060626: One year between each update, here comes the new version which should work with Erlang/Otp-R11B. I have also fixed some bugs, one 64 bits issue on 32 bits linux and a problem with glUniform??v which didn't work at all in previous releases.
050603: Something have happend, a new release includes opengl-2.0 and FBO support, and it should work on 64bits machines now, thanks Spikethehobbitmage for patches and Alfredo Tupone for testing.
041025: Fixed some problems with new opengl functionality, fixed the quit function and Vlad fixed alot with the sdl_video functions.
040615: Fixed some double alignment problems and updated opengl-1.5 with shader support.
030909: Mostly Windows work esdl now also builds with mingw, the windows binary lib should be used with otp-R9C, slightly faster c-callbacks, and an upto -date api generator.
030526: A lot of changes, improved memory handling and some incompatible event handling changes, see the release notes for the release.
030314: Fixed some compilation errors and include dir is now installed correctly, added fragment_program_arb as an extension, Extended the erldemo example with bump mapping by using multitexture.
031131: The opengl and glu libraries as been re-written, for better performance,
opengl is upgraded to version 1.4 (depending on the host drivers of course) including
all ARB extensions, other extensions will be added on request or code. :-)
This release is not backwards compatible.
The port interface has been thrown in the garbage can along with sdl:init_server(..).
Also some opengl calls may have been changed.
021129: Bjorn has fixed glu:scaleImage/9, and corrected a buffer overrun error in sdl_keyboard:getKeyState/0. Also the building of test directory now works.
021008: Performance improvements by Bjorn and SDL-1.2.5a in windows package.
020808: Faster event handling (thanks Bjorn), and compiles with gcc-3.0 (bugreport).
020415: Added sdl_video:[s/g]et_gamma/Ramp. Small speed improvement to glu:tess_vertex, I have also changed binary to SDL-1.2.4 in the windows build.
020225: Fixed bug in glu:unProject reported by Howardt, and a bug in gl:readPixels.
020206: Added sdl_video:wm_isMaximed() (Wings request) and fixed bugs in sdl_video:listModes/2. Added some test to testgl.
020129: David Wallin has made a new MacOSX port which works better with newer version of SDL (> SDL-1.2.3). Currently the cvs version from Jan 22 2002,works best. THANKS David.
020129:I have noticed that erlang needs to be compiled with --enable-threads to work with newer version of nvidia drivers on linux.
020107: WingsOne has fixed a bug in gl:feedBackBuffer, Thanks.
011218: Bjorn fixed a bug in mouse cursor code, needed for wings.
011203: Fixed tesselation bug, as wings users discovered, the tessalation code could seg. fault the emulator.
011128: Tessalation is more complete now, you can send extra data to it like colors, normals and u,v coordinates.
011126: glu:project was buggy.
SDL-1.2.3 also handles the videoExpose event on windows.
A first (beta) implementation on the GLU_Tessalation routines, with some basic callbacks are
implemented.
011122: I installed Linux from scratch (again) and noticed that you couldn't compile esdl :-) what you need is to get the latest glu library that is provided by SGI, or a rpm on the buttom of the mesa download site . Get oss-opengl-glu-*.rpm.
010926: Erlang conference demo a simple ball game.
010906: Uses SDL.dll from the $ESDL_DIR/priv dir if it exists And the precompiled windows release includes a SDL.dll
010704: Added videoExpose event (though currently SDL only supports it on X), Fixed sdl_keyboard:enableKeyRepeat
010615: Allowed gl:texImage and a couple of other functions to take binaries as arguments.
010423:
Joystick now works (though I noticed that the axis differs slightly
between linux and win32).
Resize events is also implemented.
010417: Now uses port_control for calls which is slightly faster, some bugs fixes provided by bjorn with (gl) selection buffer. I also removed the "don't use directx events" which seems to work now with newer sdl versions, if someone has problems with events send me an email.
010221: Fixed errors in glu:newQuadric, and started poking around in sdl_audio.
010214:
Fixed errors in gl:multMatrix*
010208:
Fixed some errors in gl.erl.
Note that the <<0:32/float>> generates an exit(badarg) at runtime,
i.e. if you send an integer to function which wants a float,
sdl will exit with badarg.
001130:
Generate some brief documentation.
001128:
ESDL is started as a linked in driver as default now, if you don't want that
see argument FLAGS to sdl:init_server() in sdl.hrl comments.
Windows build is pretty stable.
001013:
I have changed the eventhandling again. And started with a windows port,
see download.