This PR implements the useful SDL function SDL_SetRenderTarget for setting a texture as a renderer's target.
SDL_SetRenderTarget accepts NULL as the destination texture, in which case the target is reverted to the renderer's default. This is implemented by the use of an explicit Sdltexture.t option argument. I considered ?texture:Sdltexture.t, but to clear the texture, the user would have to do set_render_target renderer () which doesn't convey intention well.
This PR implements the useful SDL function
SDL_SetRenderTarget
for setting a texture as a renderer's target.SDL_SetRenderTarget
acceptsNULL
as the destination texture, in which case the target is reverted to the renderer's default. This is implemented by the use of an explicitSdltexture.t option
argument. I considered?texture:Sdltexture.t
, but to clear the texture, the user would have to doset_render_target renderer ()
which doesn't convey intention well.