bool RenderShadowToTexture(int obj,float* matrix,int texture,swshadowmapstruct* swshadowmap)

                Render the object with his matrix into a shadow texture. The input texture must be with shadow texture type. You can define it when you create a texture with CreateTexture(). The texture size is define in the endgine like RENDERTARGSIZE. Normally it is 256. It will make a swshadowmap object, that will represent the parameters of the map with your texture. So you can use it on more objects, therefore you can make more shadow with it.

                IMPORTANT: you need make it after Render, or before Render, because it modify the rendertarget.

 

                Obj: Id of input object.

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

                Texture: Id of texture.

                Swshadowmap[out]: your shadow map object in swshadowmapstruct.

 

                Result:

                Success