GithubHelp home page GithubHelp logo

isabella232 / esdl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erlsci/esdl

0.0 0.0 0.0 1.12 MB

Esdl is a legacy library for accessing SDL and OpenGL from Erlang. (New applications is better off using wx in Erlang/OTP R13B.)

Home Page: http://esdl.sourceforge.net

License: Other

Erlang 56.36% Makefile 1.12% C 40.10% Shell 2.42%

esdl's Introduction

ESDL by Dan Gudmundsson 
Currently located at http://esdl.sourceforge.net

What is it?
===========
Esdl is library for accessing SDL (Simple DirectMedia Layer)
and OpenGL through Erlang.

Simple DirectMedia Layer is a cross-platform multimedia library
designed to provide fast access to the graphics framebuffer and audio
device. It also do event handling from mouse, keyboards and joysticks.
It is also possible to use TrueType fonts through SDL_ttf
(www.libsdl.org/projects/SDL_ttf/) and images through SDL_image
(www.libsdl.org/projects/SDL_image/). More information can be
found at libsdl.org

OpenGL is a cross-platform standard for 3D rendering and
3D hardware acceleration. More information can be found at
www.opengl.org

News
========= 
1.3.1:
   Throw away Makefiles and use rebar for building

1.3:
   Builds with otp-r15b

1.2:
   I have removed the opengl specific part from esdl, now esdl
   requires that wx is available for opengl usage.
   
   This means that this release is not backwards compatible 
   with the old release, some gl functions have been changed in wx gl.

   This is done to only have one gl.erl in your (erlang) system,
   and it also more up to date with the standard.
   Actually only wx/ebin/gl.beam wx/ebin/glu.beam and wx/priv/OS/erl_gl.[so|dll]
   is required.

   Also using wx's opengl allowed me to create an opengl thread,
   if the erlang emulator is multithreaded. So now sdl with opengl
   works for both smp and single threaded erlang.
   
 
Compilation and Installation
=============================

You need erlang (www.erlang.org). This release has only been
tested on R16B, it requires R14B version for opengl to work.

You need libsdl (www.libsdl.org) (the development package) version > 1.2.5
For windows grab SDL-devel-1.2.15-VC.zip 
    (which work with both gcc and cl and contains both x86 and x64 libs)

On Mac OS X, you also must install XQuartz from:

   http://xquartz.macosforge.org

(Needed for the X11 header files.)

And optionally you'll need:
* SDL_ttf (www.libsdl.org/projects/SDL_ttf/) version > 2.0.7
* SDL_image (www.libsdl.org/projects/SDL_image/) version > 1.2.4

You need rebar, see: github.com/rebar/rebar

Build with: 
rebar compile

On windows:
===========
SDL_DIR=/opt/local rebar compile (requires Microsoft's SDK)
or 
CC=gcc SDL_DIR=/opt/local rebar compile (requires mingw)
also copy SDL.dll to esdl/priv dir or put SDL.dll somewhere in your path.

Note: for x64 and mingw-gcc you (currently) can not link against libraries build with 
MCL so you will need to recreate the dependency libs,
see http://sourceforge.net/apps/trac/mingw-w64/wiki/Answer%2064%20bit%20MSVC-generated%20x64%20.lib

::This is currently not supported::

Optionally you'll also need SDL_ttf for the font support 
and SDL_image for the image support.

    Note: SDL_ttf and SDL_image are disabled by default, since they
          depend on libraries not in the plain vanilla SDL packages.
          By making them optional one can compile and run esdl without
          having to bother about getting hold of the SDL_ttf and
          SDL_image libraries.  Enable them in the Makefile:

              ENABLE_SDL_TTF = yes
              ENABLE_SDL_IMAGE = yes


Testing esdl can be done by building the tests in the test directory and 
running the test programs, example:
cd test
erl +S1 -pa ../ebin   (werl on windows) 
Erlang (BEAM) emulator version 5.1.1 [threads:0]
Eshell V5.1.1  (abort with ^G)
1> testsprite:go().    %% Escape quits
2> testgl:go().  
3> erldemo:go().
4> testaudio:go(). 
5> testjoy:go().
6> test_ttf:go("/usr/share/fonts/truetype/freefont/FreeSerif.ttf", 20).
7> test_glfont:go("/usr/share/fonts/truetype/freefont/FreeSans.ttf").
8> test_glimg:go().


Regards 
/Dan (d g u d @ users.sf.net)

esdl's People

Contributors

bjorng avatar davidosborn avatar dgud avatar giniu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.