xscreensaver will launch your program, but if your program is not drawing on the X root window, then you can whistle Dixie all you like because you won't see your wonderful special effects on screen since xscreensaver will display the X root window over the top of your window. So you really ought to be drawing on the X root window, which means that you have to get down and dirty with the X windows API. Which will probably force you into using GLX, instead of SDL or GLUT (whose fullscreen modes do not use the root window).

But I may be wrong. Have you tried it yourself? If so, please post some example GLUT or SDL source code, and the line that you add to the xscreensaver config file.

Here's some stuff I found in the xscreensaver manual:

To use a program as a screensaver, two things are required:
that that program draw on the root window (or be able to be
configured to draw on the root window); and that that program
understand ``virtual root'' windows, as used by virtual window
managers such as tvtwm(1). (Generally, this is accomplished by
just including the "vroot.h" header file in the program's
source.)
When it is time to activate the screensaver, a full-screen black window
is created on each screen of the display. Each window is created in
such a way that, to any subsequently-created programs, it will appear
to be a ``virtual root'' window. Because of this, any program which
draws on the root window (and which understands virtual roots) can be
used as a screensaver.