module SFML::Graphics::RenderTarget

Shared behaviour between SFML::RenderWindow and SFML::RenderTexture. The two CSFML APIs are near-mirrors of each other (sfRenderWindow* vs sfRenderTexture*), so the Ruby side dispatches by the includer’s CSFML_PREFIX constant. Adding a new render target only takes:

class NewTarget include Graphics::RenderTarget CSFML_PREFIX = :sfNewTarget … end

Drawables call target._draw_native(:CircleShape, handle) to dispatch through the right CSFML draw function for whichever target they’re being rendered to.