{"id":18510038,"url":"https://github.com/lfex/sdl2-examples","last_synced_at":"2025-04-09T04:33:03.189Z","repository":{"id":67235684,"uuid":"57310236","full_name":"lfex/sdl2-examples","owner":"lfex","description":"LFE SDL2 Examples using Loïc's Erlang NIF","archived":false,"fork":false,"pushed_at":"2016-04-29T17:41:44.000Z","size":415,"stargazers_count":11,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T23:15:15.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lfex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-28T14:56:48.000Z","updated_at":"2025-02-05T13:47:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"143b22c3-6919-4ae6-bdc3-e849093f7c41","html_url":"https://github.com/lfex/sdl2-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfex%2Fsdl2-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfex%2Fsdl2-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfex%2Fsdl2-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfex%2Fsdl2-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfex","download_url":"https://codeload.github.com/lfex/sdl2-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980831,"owners_count":21027803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T15:20:20.038Z","updated_at":"2025-04-09T04:33:03.136Z","avatar_url":"https://github.com/lfex.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sdl2-examples\n\n[![][sdl-logo]][sdl-logo-large]\n\n*SDL2 Examples in LFE*\n\n\n##### Contents\n\n* [Introduction](#introduction-)\n* [Dependencies](#dependencies-)\n* [Installation](#installation-)\n* [Usage](#usage-)\n  * [Example 1](#example-1-)\n* [License](#license-)\n\n\n## Introduction [\u0026#x219F;](#contents)\n\nSimple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.\n\nThe Erlang/LFE/Elixir ecosystem have access to SDL via the following Erlang libraries:\n\n* [esdl](https://github.com/dgud/esdl)\n* [esdl2](https://github.com/ninenines/esdl2)\n\nThe example in this repo take advantage of the newer SDL2 library and the Erlang bindings\nfor it that Loïc has made available with esdl2.\n\n\n## Dependencies [\u0026#x219F;](#contents)\n\nThe following are required to be installed on your system:\n\n* Erlang\n* rebar3\n* SDL2\n\nIf installing on a Mac with Homebrew, you will need ``sdl2`` and ``sdl2_image``. The list of packages developed against for Ubuntu are listed in this project's ``.travis.yml`` config file.\n\n\n## Installation [\u0026#x219F;](#contents)\n\nIn your ``rebar.config`` file, update your ``deps`` section to include\n``lutil``:\n\n```erlang\n{deps, [\n  {sdl2ex, {git, \"https://github.com/lfex/sdl2-examples.git\"}}\n]}\n```\n\n\n## Usage [\u0026#x219F;](#contents)\n\n### Example 1 [\u0026#x219F;](#contents)\n\nStart up the LFE repl:\n\n```bash\n$ make repl\n```\n\nThen run the example:\n\n```lisp\n\u003e (sdl2ex-hello:run)\n```\n\nThis will open up a window like you see here:\n\n[![Hello SDL screenshot][sdl-hello-screen-thumb]][sdl-hello-screen]\n\nWhen you're done admiring the logo, closing the window will cause the LFE application to shutdown.\n\n\n## License [\u0026#x219F;](#contents)\n\nOriginal Erlang:\n\n```\nCopyright © 2014-2015, Loïc Hoguin\n```\n\nLFE port:\n```\nCopyright © 2016 Duncan McGreggor\n\nDistributed under the Apache License, Version 2.0.\n```\n\n\u003c!-- Named page links below: /--\u003e\n\n[sdl-logo]: priv/images/sdl-logo-x250.png\n[sdl-logo-large]: priv/images/sdl-logo-x1480.png\n\n[sdl-hello-screen-thumb]: priv/images/screenshot-hello-sdl-thumb.png\n[sdl-hello-screen]: priv/images/screenshot-hello-sdl.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfex%2Fsdl2-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfex%2Fsdl2-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfex%2Fsdl2-examples/lists"}