SDL Bouncing Ball

A Simple SDL Demo that uses Hardware Acceleration and Double Buffering to draw
three Sphere images on the screen and bounce them around a bit.

It uses SDL_Image for loading the PNG file.

Copy and paste the source code to a file and compile it like this:

gcc -Wall -ansi -pedantic `sdl-config –cflags` -c bounce.c
gcc -Wall main.o -o main -lSDL_image -L/usr/X11R6/lib -L/usr/lib -lSDL -lpthread

Bounce.c

[Digg] [Reddit] [DZone]

Leave a comment