thechampagne / sdl2-examples

SDL2 examples, for 20 different programming languages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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
  • Alire for the Ada example
  • 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

  • Fortran
  • F#
  • Java
  • Scheme

Pull requests are welcome.

General information

  • License: BSD-3

About

SDL2 examples, for 20 different programming languages

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


Languages

Language:Makefile 15.2%Language:C++ 14.4%Language:Assembly 9.2%Language:C 7.8%Language:CMake 5.6%Language:Dart 5.6%Language:Scala 5.5%Language:C# 5.3%Language:Pony 3.7%Language:Zig 3.0%Language:Ada 2.3%Language:Shell 2.3%Language:Go 2.3%Language:Kotlin 2.1%Language:D 2.0%Language:V 1.6%Language:Haskell 1.5%Language:Rust 1.3%Language:Pascal 1.3%Language:Odin 1.1%Language:OCaml 0.9%Language:Ring 0.9%Language:Python 0.9%Language:Nim 0.8%Language:Ruby 0.8%Language:Lua 0.7%Language:FreeBasic 0.7%Language:Common Lisp 0.7%Language:Crystal 0.6%