For a simple model viewer, I would rather use simple softshadowmapping. You get into trouble, when the models are not closed.

There is a small demo in the Gamestudio \samples folder.