swshadowstruct*   SWShadowBuildFromObj(int obj,float* matrix,float* shadowobjmatrix,   swshadowmapstruct shadowmap, swshadowstruct* located)

            Project the input shadow map to the object. The output will be a software shadow object, but you can use the old shadow object avoid the new memory allocation.

 

                Obj: Id of input object.

                Matrix: TMatrix of input object. It is in world space.

                Shadowobjmatrix: Tmatrix of shadowed object in world space. If you have same object on different place, so you can give it here.

                shadowmap: The shadow map of shadowed object, that you made with RenderShadowToTexture().

                located: Your old shadow object,or you can allocate memory for it by

 ShadowSizeFromObj(). And it can be NULL, so this function will allocate memory for it.

 

 

                Result:

                Pointer of shadow object. Yon need release it in the future from heap.