Posts Tagged ‘graphics’

Found an opengl bouncing ball demo

Sunday, September 13th, 2009

OpenGL Bouncing Ball
I complied it with:
gcc ./bounce.c -I/usr/X11R6/include -lglut -lGL -lXext -lX11 -L/usr/X11R6/lib
It was interesting.
Now looking for an SDL version of opengl 3d bouncing ball.

Got physics and gravity working in ball bounce demo.

Sunday, July 26th, 2009

Have you ever wanted to know how they simulate balls bouncing off each other and being pulled down by gravity? Here is some simple code using SDL and C that shows how it works.

Adding font display to the graphics.

Saturday, July 18th, 2009

fontdemo.c
I had to install the SDL_ttf dev library to compile this one.
The command line to compile this is:
gcc `sdl-config –cflags –libs` -lSDL_ttf fontdemo.c
Notice the additional
-lSDL_ttf
that was added.
The original example code is here.
The arial ttf library is at that link.  It has to be renamed to all lowercase to work.
I added a check to see [...]