Giter Site home page Giter Site logo

xyproto / sdl2-examples Goto Github PK

View Code? Open in Web Editor NEW
310.0 14.0 39.0 2.61 MB

SDL2 examples, for 25+ different programming languages

License: BSD 3-Clause "New" or "Revised" License

C++ 20.17% CMake 7.90% C 10.92% Pascal 1.82% Go 3.16% Ruby 1.13% Python 1.20% Nim 1.17% Lua 1.02% Shell 3.29% Makefile 21.94% Rust 1.87% Pony 5.13% Crystal 0.78% D 2.80% Zig 4.15% C# 7.46% Common Lisp 0.92% FreeBasic 0.93% V 2.22%
sdl2 c go lua nim python rust pony zig crystal

sdl2-examples's Introduction

SDL2 Examples

sdl2-examples

"hello world" for SDL2 for various programming languages.

Each sample creates a window, displays an image, then waits two seconds and quits.

All executables should ideally build and run on Linux, macOS, Windows, BSD* and more, but they should at least work on Linux. Most subdirectories contains README.md files with more details, and a Makefile to have one way of building each sample.

Requirements

  • The SDL 2 library.
  • See the README.md file per sample for more information.

Requirements for some of the languages

  • C compiler that supports C89 (ANSI C), C99 or C11, for the C samples
  • A C++ compiler for the C++ sample
  • GCC 4.8 or later (or clang++) for the C++11 sample
  • Go 1.1 or later and the sdl2 go package (go get github.com/veandco/go-sdl2/sdl)
  • MRuby with SDL2 added to the configuration file
  • Nim 0.9.4 and sdl2 installed with babel
  • Python 2 or 3 and PySDL2
  • FPC 2.6.4 (or later than 2.4.0, must have Uint8, Uint16 and Uint32)
  • Lua (tested with Lua 5.3) and lua-sdl2
  • If tcc is used for compiling one of the C examples, make sure to add -DSDL_DISABLE_IMMINTRIN_H=1.

Languages that are not added yet

  • Ada (see the ada directory in the ada branch if you wish to give it a spin, please create a PR if it works on Arch Linux and/or the Linux CI test also passes).
  • Fortran
  • Java (but I gave it a shot).
  • Scheme

Pull requests are welcome.

General information

  • License: BSD-3

sdl2-examples's People

Contributors

bensuperpc avatar bholten avatar dependabot[bot] avatar jquorning avatar larpon avatar oli-obk avatar pczarn avatar simonjwright avatar steveklabnik avatar thechampagne avatar xyproto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.