Skip to content

gotoc/simple2d

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple 2D

A simple 2D graphics engine written in C. Check out the website »

Build and install with:

make && make install

Running Tests

Getting Test Media

To keep the size of this repository small, media needed for tests are checked into the test_media repo and referenced as a Git submodule. After cloning this repo, init the submodule and get its contents using:

git submodule init
git submodule update --remote

Alternatively, you can clone the repo and update the submodule in one step using:

git clone --recursive https://github.com/simple2d/simple2d.git

Simply run git submodule update --remote anytime to get the latest changes from test_media (i.e. when there's a new commit available).

Building the Tests

Simply run make tests. Built tests are placed in the tests/ directory with the same name as their C source file.

Available Tests

  • triangle.c – The "hello triangle" example from the simple2d.com website.
  • testcard.c – A graphical card similar to testcards in TV, testing a wide range of visual capabilities.
  • audio.c – Tests audio functions with different file formats interpreted as samples and music.

Run a test using make tests && cd tests/ && ./<name_of_test>, for example:

make tests && cd tests/ && ./triangle

Or, conveniently run tests using bash test.sh <name_of_test>, for example:

# Run triangle.c
bash test.sh triangle

# Run audio.c
bash test.sh audio

About

A simple, open-source 2D graphics engine for everyone.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 72.7%
  • Shell 25.3%
  • Makefile 2.0%