Commits

Marcus von Appen committed d7246b1

- fixed issue #36 and #39: the different render classes of sdl2.ext.sprite were renamed
* the sdl2.ext.RenderContext class was renamed to sdl2.ext.Renderer to be
consistent with with SDL2's naming scheme
* sdl2.ext.SpriteRenderer was renamed to sdl2.ext.SpriteRenderSystem
* sdl2.ext.SoftwareSpriteRenderer was renamed to sdl2.ext.SoftwareSpriteRenderSystem
* sdl2.ext.TextureSpriteRenderer was renamed to sdl2.ext.TextureSpriteRenderSystem

Comments (0)

Files changed (13)

doc/modules/sdl2ext_draw.rst

    The drawing functions within this module are unoptimised and should not be
    considered fast. If you want improved drawing of 2D primitives, including
    hardware acceleration, you should use the methods of the
-   :class:`RenderContext` instead.
+   :class:`Renderer` instead.
 
 .. function:: prepare_color(color : object, target : object) -> int
 

doc/modules/sdl2ext_sprite.rst

       The layer depth on which to draw the :class:`Sprite`.
       :class:`Sprite` objects with higher :attr:`depth` values will be
       drawn on top of other :class:`Sprite` values by the
-      :class:`SpriteRenderer`.
+      :class:`SpriteRenderSystem`.
 
 .. class:: SoftwareSprite()
 
    .. method:: subsprite(area : (int, int, int, int)) -> SoftwareSprite
 
       Creates another :class:`SoftwareSprite` from a part of the
-      :class:`SoftwareSprite`. The two sprites share pixel data, so if the 
+      :class:`SoftwareSprite`. The two sprites share pixel data, so if the
       parent sprite's surface is not managed by the sprite (``free`` is False),
       you will need to keep it alive while the subsprite exists.
 
 
       The :class:`sdl2.SDL_Texture` containing the texture data.
 
-.. class:: SpriteRenderer()
+.. class:: SpriteRenderSystem()
 
    A rendering system for :class:`Sprite` components. This is a base class for
    rendering systems capable of drawing and displaying :class:`Sprite` based
          This is a no-op function and needs to be implemented by inheriting
          classes.
 
-.. class:: SoftwareSpriteRenderer(window : object)
+.. class:: SoftwareSpriteRenderSystem(window : object)
 
    A rendering system for :class:`SoftwareSprite` components. The
-   :class:`SoftwareSpriteRenderer` class uses a :class:`sdl2.SDL_Window` as
+   :class:`SoftwareSpriteRenderSystem` class uses a :class:`sdl2.SDL_Window` as
    drawing device to display :class:`SoftwareSprite` surfaces. It uses the
    internal SDL surface of the *window* as drawing context, so that GL
    operations, such as texture handling or the usage of SDL renderers is not
       position. If *sprites* is a single :class:`SoftwareSprite`, *x* and *y*
       denote the absolute position of the :class:`SoftwareSprite`, if set.
 
-.. class:: TextureSpriteRenderer(target : object)
+.. class:: TextureSpriteRenderSystem(target : object)
 
    A rendering system for :class:`TextureSprite` components. The
-   :class:`TextureSpriteRenderer` class uses a :class:`sdl2.SDL_Renderer` as
+   :class:`TextureSpriteRenderSystem` class uses a :class:`sdl2.SDL_Renderer` as
    drawing device to display :class:`Sprite` surfaces.
 
    *target* can be a :class:`sdl2.ext.Window`, :class:`sdl2.SDL_Window`,
-   a:class:`sdl2.ext.RenderContext` or a :class:`sdl2.SDL_Renderer`. If it is a
+   a:class:`sdl2.ext.Renderer` or a :class:`sdl2.SDL_Renderer`. If it is a
    :class:`sdl2.ext.Window` or :class:`sdl2.SDL_Window` instance, it will try
    to create a :class:`sdl2.SDL_Renderer` with hardware acceleration for it.
 
       :attr:`default_args` contain the same keys, the key-value pair of
       *kwargs* is chosen.
 
-   .. method:: create_sprite_renderer(*args, **kwargs) -> SpriteRenderer
+   .. method:: create_sprite_render_system(*args, **kwargs) -> SpriteRenderSystem
 
-      Creates a new :class:`SpriteRenderer`, based on the set
+      Creates a new :class:`SpriteRenderSystem`, based on the set
       :attr:`sprite_type`. If :attr:`sprite_type` is ``TEXTURE``, a
-      :class:`TextureSpriteRenderer` is created with the the
+      :class:`TextureSpriteRenderSystem` is created with the the
       ``renderer`` from the :attr:`default_args`. Other keyword
       arguments are ignored in that case.
 
-      Otherwise a :class:`SoftwareSpriteRenderer` is created and *args*
+      Otherwise a :class:`SoftwareSpriteRenderSystem` is created and *args*
       and *kwargs* are passed to it.
 
    .. method:: create_texture_sprite(renderer : object, size, pformat=sdl2.SDL_PIXELFORMAT_RGBA8888, access=sdl2.SDL_TEXTUREACCESS_STATIC) -> TextureSprite
       requires a :class:`sdl2.ext.FontManager` to be in *kwargs* or
       :attr:`default_args`.
 
-.. class:: RenderContext(target : obj[, index=-1[, flags=sdl2.SDL_RENDERER_ACCELERATED]])
+.. class:: Renderer(target : obj[, index=-1[, flags=sdl2.SDL_RENDERER_ACCELERATED]])
 
    A rendering context for windows and sprites that can use hardware or
    software-accelerated graphics drivers.
 
    .. attribute:: rendertarget
 
-      The target for which the :class:`RenderContext` was created.
+      The target for which the :class:`Renderer` was created.
 
    .. attribute:: color
 
 
       Copies (blits) the passed *src*, which can be a :class:`TextureSprite` or
       :class:`sdl2.SDL_Texture`, to the target of the
-      :class:`RenderContext`. *srcrect* is the source rectangle to be used for
+      :class:`Renderer`. *srcrect* is the source rectangle to be used for
       clipping portions of *src*. *dstrect* is the destination rectangle.
 
    .. method:: draw_line(points : iterable[, color=None]) -> None

doc/tutorial/helloworld.rst

     factory = sdl2.ext.SpriteFactory(sdl2.ext.SOFTWARE)
     sprite = factory.from_image(RESOURCES.get_path("hello.bmp"))
 
-    spriterenderer = factory.create_sprite_renderer(window)
+    spriterenderer = factory.create_sprite_render_system(window)
     spriterenderer.render(sprite)
 
 First, we initialise the :mod:`sdl2.ext` internals to gain access to the
 factory allows us to switch between texture-based, hardware-accelerated, and
 software-based sprites easily.
 
-To display the image, we will use a :class:`sdl2.ext.SpriteRenderer`,
+To display the image, we will use a :class:`sdl2.ext.SpriteRenderSystem`,
 which supports the sprite type (texture- or software-based) and can copy the
-image to the window for display. The :class:`sdl2.ext.SpriteRenderer`
+image to the window for display. The :class:`sdl2.ext.SpriteRenderSystem`
 needs to know, where to copy to, thus we have to supply the window as target
 for copy and display operations.
 
 All left to do is to initiate the copy process by calling
-:class:`sdl2.ext.SpriteRenderer.render()` with the image we
+:class:`sdl2.ext.SpriteRenderSystem.render()` with the image we
 created earlier.
 
 .. tip::

doc/tutorial/pong.rst

 
     WHITE = sdl2.ext.Color(255, 255, 255)
 
-    class SoftwareRenderer(sdl2.ext.SoftwareSpriteRenderer):
+    class SoftwareRenderer(sdl2.ext.SoftwareSpriteRenderSystem):
         def __init__(self, window):
             super(SoftwareRenderer, self).__init__(window)
 
         sys.exit(run())
 
 The first thing to do is to enhance the
-:class:`sdl2.ext.SoftwareSpriteRenderer` so that it will paint
+:class:`sdl2.ext.SoftwareSpriteRenderSystem` so that it will paint
 the whole window screen black on every drawing cycle, before drawing all
 sprites on the window.
 
     function within the ``CollisionSystem``, if the ball collides with
     one of the paddles.
 
-  * write an own Renderer, based on :class:`sdl2.ext.Applicator`,
+  * write an own render sytem, based on :class:`sdl2.ext.Applicator`,
     which takes care of position and sprite sets ::
 
        StaticRepeatingSprite(Entity):

doc/tutorial/pygamers.rst

 pygame.Surface          sdl2
 ======================= =====================================================
 ``blit()``              :meth:`sdl2.surface.SDL_BlitSurface()`,
-                        :class:`sdl2.ext.SpriteRenderer`
+                        :class:`sdl2.ext.SpriteRenderSystem`
 ``convert()``           :func:`sdl2.surface.SDL_ConvertSurface()`
 ``convert_alpha()``     :func:`sdl2.surface.SDL_ConvertSurface()`
 ``copy()``              :func:`sdl2.surface.SDL_ConvertSurface()`

examples/colorpalettes.py

     window.show()
 
     # Explicitly acquire the window's surface to draw on. We used the
-    # SpriteRenderer class in helloworld.py, which did the drawing magic for
-    # us. Now we will do it ourselves, so we have to get a surface to draw on.
+    # SpriteRenderSystem class in helloworld.py, which did the drawing magic
+    # for us. Now we will do it ourselves, so we have to get a surface to draw
+    # on.
+    #
     # NOTE: if you intend to use textures or the SDL renderers, you must not
     # use the method.
     windowsurface = window.get_surface()
     draw_palette(windowsurface, palettes[0][1])
 
     # The event loop. In helloworld.py we used the TestEventProcessor class,
-    # since there was not much to do. Now however, we want to react on the user
-    # input. Every time the user clicks around in our window, we want to
+    # since there was not much to do. Now however, we want to react on the
+    # user input. Every time the user clicks around in our window, we want to
     # show the next palette. Once we reached the last palette within the
     # mapping table, we will start again with the first one.
     running = True

examples/gfxdrawing.py

     window.show()
 
     # Create a rendering context for the window. The sdlgfx module requires it.
-    context = sdl2.ext.RenderContext(window)
+    context = sdl2.ext.Renderer(window)
 
     # We implement the functionality as it was done in colorpalettes.py and
     # utilise a mapping table to look up the function to be executed, together
     # (or SDL_Renderer), which will create the underlying textures for us.
     if "-hardware" in sys.argv:
         print("Using hardware acceleration")
-        renderer = sdl2.ext.RenderContext(window)
+        renderer = sdl2.ext.Renderer(window)
         factory = sdl2.ext.SpriteFactory(sdl2.ext.TEXTURE, renderer=renderer)
     else:
         print("Using software rendering")
     # (for SOFTWARE), so everything you can do with those classes is also
     # possible for the UI elements.
     button = uifactory.from_image(sdl2.ext.BUTTON,
-                                   RESOURCES.get_path("button.bmp"))
+                                  RESOURCES.get_path("button.bmp"))
     button.position = 50, 50
 
     # Create a TextEntry sprite, which reacts on keyboard presses and
     checkbutton.factory = factory
 
     # Since all gui elements are sprites, we can use the
-    # SpriteRenderer class, we learned about in helloworld.py, to
+    # SpriteRenderSystem class, we learned about in helloworld.py, to
     # draw them on the Window.
-    spriterenderer = factory.create_sprite_renderer(window)
+    spriterenderer = factory.create_sprite_render_system(window)
 
     # Create a new UIProcessor, which will handle the user input events
     # and pass them on to the relevant user interface elements.

examples/helloworld.py

     # (or SDL_Renderer), which will create the underlying textures for us.
     if "-hardware" in sys.argv:
         print("Using hardware acceleration")
-        renderer = sdl2.ext.RenderContext(window)
+        renderer = sdl2.ext.Renderer(window)
         factory = sdl2.ext.SpriteFactory(sdl2.ext.TEXTURE, renderer=renderer)
     else:
         print("Using software rendering")
         factory = sdl2.ext.SpriteFactory(sdl2.ext.SOFTWARE)
 
     # Creates a simple rendering system for the Window. The
-    # SpriteRenderer can draw Sprite objects on the window.
-    spriterenderer = factory.create_sprite_renderer(window)
+    # SpriteRenderSystem can draw Sprite objects on the window.
+    spriterenderer = factory.create_sprite_render_system(window)
 
     # Creates a new 2D pixel-based surface to be displayed, processed or
     # manipulated. We will use the one of the shipped example images

examples/particles.py

 
 
 # Create a simple rendering system for particles. This is somewhat
-# similar to the TextureSprinteRenderer from sdl2.ext. Since we operate on
+# similar to the TextureSprinteRenderSystem from sdl2.ext. Since we operate on
 # particles rather than sprites, we need to provide our own rendering logic.
-class ParticleRenderer(sdl2.ext.System):
+class ParticleRenderSystem(sdl2.ext.System):
     def __init__(self, renderer, images):
         # Create a new particle renderer. The surface argument will be
         # the targets surface to do the rendering on. images is a set of
         # images to be used for rendering the particles.
-        super(ParticleRenderer, self).__init__()
+        super(ParticleRenderSystem, self).__init__()
         # Define, what component instances are processed by the
         # ParticleRenderer.
         self.componenttypes = (CParticle,)
     # Create a hardware-accelerated sprite factory. The sprite factory requires
     # a rendering context, which enables it to create the underlying textures
     # that serve as the visual parts for the sprites.
-    renderer = sdl2.ext.RenderContext(window)
+    renderer = sdl2.ext.Renderer(window)
     factory = sdl2.ext.SpriteFactory(sdl2.ext.TEXTURE, renderer=renderer)
 
     # Create a set of images to be used as particles on rendering. The
     # similar to the SoftSpriteRenderer, but since we only operate with
     # hundreds of particles (and not sprites with all their overhead),
     # we need an own rendering system.
-    particlerenderer = ParticleRenderer(renderer, images)
+    particlerenderer = ParticleRenderSystem(renderer, images)
     world.add_system(particlerenderer)
 
     # The almighty event loop. You already know several parts of it.
                     vel.vy = 0
 
 
-class SoftwareRenderer(sdl2.ext.SoftwareSpriteRenderer):
+class SoftwareRenderSystem(sdl2.ext.SoftwareSpriteRenderSystem):
     def __init__(self, window):
-        super(SoftwareRenderer, self).__init__(window)
+        super(SoftwareRenderSystem, self).__init__(window)
 
     def render(self, components):
         sdl2.ext.fill(self.surface, BLACK)
-        super(SoftwareRenderer, self).render(components)
+        super(SoftwareRenderSystem, self).render(components)
 
 
-class TextureRenderer(sdl2.ext.TextureSpriteRenderer):
+class TextureRenderSystem(sdl2.ext.TextureSpriteRenderSystem):
     def __init__(self, renderer):
-        super(TextureRenderer, self).__init__(renderer)
+        super(TextureRenderSystem, self).__init__(renderer)
         self.renderer = renderer
 
     def render(self, components):
         self.renderer.color = BLACK
         self.renderer.clear()
         self.renderer.color = tmp
-        super(TextureRenderer, self).render(components)
+        super(TextureRenderSystem, self).render(components)
 
 
 class Velocity(object):
 
     if "-hardware" in sys.argv:
         print("Using hardware acceleration")
-        renderer = sdl2.ext.RenderContext(window)
+        renderer = sdl2.ext.Renderer(window)
         factory = sdl2.ext.SpriteFactory(sdl2.ext.TEXTURE, renderer=renderer)
     else:
         print("Using software rendering")
     collision = CollisionSystem(0, 0, 800, 600)
     aicontroller = TrackingAIController(0, 600)
     if factory.sprite_type == sdl2.ext.SOFTWARE:
-        spriterenderer = SoftwareRenderer(window)
+        spriterenderer = SoftwareRenderSystem(window)
     else:
-        spriterenderer = TextureRenderer(renderer)
+        spriterenderer = TextureRenderSystem(renderer)
 
     world.add_system(aicontroller)
     world.add_system(movement)

sdl2/ext/sprite.py

 from ..stdinc import Uint8, Uint32
 
 __all__ = ["Sprite", "SoftwareSprite", "TextureSprite", "SpriteFactory",
-           "SoftwareSpriteRenderer", "SpriteRenderer",
-           "TextureSpriteRenderer", "RenderContext", "TEXTURE", "SOFTWARE"]
+           "SoftwareSpriteRenderSystem", "SpriteRenderSystem",
+           "TextureSpriteRenderSystem", "Renderer", "TEXTURE", "SOFTWARE"]
 
 TEXTURE = 0
 SOFTWARE = 1
 
 
-class RenderContext(object):
-    """SDL2-based rendering context for windows and sprites."""
+class Renderer(object):
+    """SDL2-based renderer for windows and sprites."""
     def __init__(self, target, index=-1,
                  flags=render.SDL_RENDERER_ACCELERATED):
-        """Creates a new RenderContext for the given target.
+        """Creates a new Renderer for the given target.
 
         If target is a Window or SDL_Window, index and flags are passed
         to the relevant sdl.render.create_renderer() call. If target is
 
     @property
     def color(self):
-        """The drawing color of the RenderContext."""
+        """The drawing color of the Renderer."""
         r, g, b, a = Uint8(), Uint8(), Uint8(), Uint8()
         ret = render.SDL_GetRenderDrawColor(self.renderer, byref(r), byref(g),
                                             byref(b), byref(a))
 
     @color.setter
     def color(self, value):
-        """The drawing color of the RenderContext."""
+        """The drawing color of the Renderer."""
         c = convert_to_color(value)
         ret = render.SDL_SetRenderDrawColor(self.renderer, c.r, c.g, c.b, c.a)
         if ret == -1:
             raise SDLError()
 
     def clear(self, color=None):
-        """Clears the rendering context with the currently set or passed
-        color."""
+        """Clears the renderer with the currently set or passed color."""
         if color is not None:
             tmp = self.color
             self.color = color
             raise SDLError()
 
     def copy(self, src, srcrect=None, dstrect=None):
-        """Copies (blits) the passed source to the target of the
-        RenderContext,"""
+        """Copies (blits) the passed source to the target of the Renderer."""
         SDL_Rect = rect.SDL_Rect
         if isinstance(src, TextureSprite):
             texture = src.texture
             raise SDLError()
 
     def present(self):
-        """Refreshes the target of the RenderContext,"""
+        """Refreshes the target of the Renderer."""
         render.SDL_RenderPresent(self.renderer)
 
     def draw_line(self, points, color=None):
-        """Draws one or multiple lines on the rendering context."""
+        """Draws one or multiple lines on the renderer."""
         # (x1, y1, x2, y2, ...)
         pcount = len(points)
         if (pcount % 4) != 0:
                 raise SDLError()
 
     def draw_point(self, points, color=None):
-        """Draws one or multiple points on the rendering context."""
+        """Draws one or multiple points on the renderer."""
         # (x1, y1, x2, y2, ...)
         pcount = len(points)
         if (pcount % 2) != 0:
                 raise SDLError()
 
     def draw_rect(self, rects, color=None):
-        """Draws one or multiple rectangles on the rendering context."""
+        """Draws one or multiple rectangles on the renderer."""
         SDL_Rect = rect.SDL_Rect
         # ((x, y, w, h), ...)
         if type(rects[0]) == int:
                 raise SDLError()
 
     def fill(self, rects, color=None):
-        """Fills one or multiple rectangular areas on the rendering
-        context."""
+        """Fills one or multiple rectangular areas on the renderer."""
         SDL_Rect = rect.SDL_Rect
         # ((x, y, w, h), ...)
         if type(rects[0]) == int:
 
     def subsprite(self, area):
         """Creates another SoftwareSprite from a part of the SoftwareSprite.
-        
+
         The two sprites share pixel data, so if the parent sprite's surface is
         not managed by the sprite (free is False), you will need to keep it
         alive while the subsprite exists."""
         return "SpriteFactory(sprite_type=%s, default_args=%s)" % \
             (stype, self.default_args)
 
-    def create_sprite_renderer(self, *args, **kwargs):
-        """Creates a new SpriteRenderer.
+    def create_sprite_render_system(self, *args, **kwargs):
+        """Creates a new SpriteRenderSystem.
 
         For TEXTURE mode, the passed args and kwargs are ignored and the
-        RenderContext or SDL_Renderer passed to the SpriteFactory is used.
+        Renderer or SDL_Renderer passed to the SpriteFactory is used.
         """
         if self.sprite_type == TEXTURE:
-            return TextureSpriteRenderer(self.default_args["renderer"])
+            return TextureSpriteRenderSystem(self.default_args["renderer"])
         else:
-            return SoftwareSpriteRenderer(*args, **kwargs)
+            return SoftwareSpriteRenderSystem(*args, **kwargs)
 
     def from_image(self, fname):
         """Creates a Sprite from the passed image file."""
         """
         if isinstance(renderer, render.SDL_Renderer):
             sdlrenderer = renderer
-        elif isinstance(renderer, RenderContext):
+        elif isinstance(renderer, Renderer):
             sdlrenderer = renderer.renderer
         else:
             raise TypeError("renderer must be a Renderer or SDL_Renderer")
         return TextureSprite(texture.contents)
 
 
-class SpriteRenderer(System):
+class SpriteRenderSystem(System):
     """A rendering system for Sprite components.
 
     This is a base class for rendering systems capable of drawing and
     method.
     """
     def __init__(self):
-        super(SpriteRenderer, self).__init__()
+        super(SpriteRenderSystem, self).__init__()
         self.componenttypes = (Sprite,)
         self._sortfunc = lambda e: e.depth
 
         self._sortfunc = value
 
 
-class SoftwareSpriteRenderer(SpriteRenderer):
+class SoftwareSpriteRenderSystem(SpriteRenderSystem):
     """A rendering system for SoftwareSprite components.
 
-    The SoftwareSpriteRenderer class uses a Window as drawing device to
+    The SoftwareSpriteRenderSystem class uses a Window as drawing device to
     display Sprite surfaces. It uses the Window's internal SDL surface as
     drawing context, so that GL operations, such as texture handling or
     using SDL renderers is not possible.
     """
     def __init__(self, window):
-        """Creates a new SoftSpriteRenderer for a specific Window."""
-        super(SoftwareSpriteRenderer, self).__init__()
+        """Creates a new SoftwareSpriteRenderSystem for a specific Window."""
+        super(SoftwareSpriteRenderSystem, self).__init__()
         if isinstance(window, Window):
             self.window = window.window
         elif isinstance(window, video.SDL_Window):
     def render(self, sprites, x=None, y=None):
         """Draws the passed sprites (or sprite) on the Window's surface.
 
-        x and y are optional arguments that can be used as relative
-        drawing location for sprites. If set to None, the location
-        information of the sprites are used. If set and sprites is an
-        iterable, such as a list of SoftwareSprite objects, x and y are
-        relative location values that will be added to each individual sprite's
-        position. If sprites is a single SoftwareSprite, x and y denote the
-        absolute position of the SoftwareSprite, if set.
+        x and y are optional arguments that can be used as relative drawing
+        location for sprites. If set to None, the location information of the
+        sprites are used. If set and sprites is an iterable, such as a list of
+        SoftwareSprite objects, x and y are relative location values that will
+        be added to each individual sprite's position. If sprites is a single
+        SoftwareSprite, x and y denote the absolute position of the
+        SoftwareSprite, if set.
         """
         r = rect.SDL_Rect(0, 0, 0, 0)
         if isiterable(sprites):
         video.SDL_UpdateWindowSurface(self.window)
 
 
-class TextureSpriteRenderer(SpriteRenderer):
+class TextureSpriteRenderSystem(SpriteRenderSystem):
     """A rendering system for TextureSprite components.
 
-    The TextureSpriteRenderer class uses a SDL_Renderer as drawing
+    The TextureSpriteRenderSystem class uses a SDL_Renderer as drawing
     device to display TextureSprite objects.
     """
     def __init__(self, target):
-        """Creates a new TextureSpriteRenderer.
+        """Creates a new TextureSpriteRenderSystem.
 
-        target can be a Window, SDL_Window, RenderContext or SDL_Renderer.
-        If it is a Window or SDL_Window instance, a RenderContext will be
+        target can be a Window, SDL_Window, Renderer or SDL_Renderer.
+        If it is a Window or SDL_Window instance, a Renderer will be
         created to acquire the SDL_Renderer.
         """
-        super(TextureSpriteRenderer, self).__init__()
+        super(TextureSpriteRenderSystem, self).__init__()
         if isinstance(target, (Window, video.SDL_Window)):
             # Create a Renderer for the window and use that one.
-            target = RenderContext(target)
+            target = Renderer(target)
 
-        if isinstance(target, RenderContext):
+        if isinstance(target, Renderer):
             self._renderer = target  # Used to prevent GC
             sdlrenderer = target.renderer
         elif isinstance(target, render.SDL_Renderer):

sdl2/test/sdl2ext_sprite_test.py

         self.assertEqual(factory.default_args, {"bananas": "tasty"})
 
         window = sdl2ext.Window("Test", size=(1, 1))
-        renderer = sdl2ext.RenderContext(window)
+        renderer = sdl2ext.Renderer(window)
 
         factory = sdl2ext.SpriteFactory(sdl2ext.TEXTURE, renderer=renderer)
         self.assertIsInstance(factory, sdl2ext.SpriteFactory)
 
     def test_SpriteFactory_create_sprite(self):
         window = sdl2ext.Window("Test", size=(1, 1))
-        renderer = sdl2ext.RenderContext(window)
+        renderer = sdl2ext.Renderer(window)
         tfactory = sdl2ext.SpriteFactory(sdl2ext.TEXTURE, renderer=renderer)
         sfactory = sdl2ext.SpriteFactory(sdl2ext.SOFTWARE)
 
 
     def test_SpriteFactory_create_texture_sprite(self):
         window = sdl2ext.Window("Test", size=(1, 1))
-        renderer = sdl2ext.RenderContext(window)
+        renderer = sdl2ext.Renderer(window)
         factory = sdl2ext.SpriteFactory(sdl2ext.TEXTURE, renderer=renderer)
         for w in range(1, 100):
             for h in range(1, 100):
 
     def test_SpriteFactory_from_image(self):
         window = sdl2ext.Window("Test", size=(1, 1))
-        renderer = sdl2ext.RenderContext(window)
+        renderer = sdl2ext.Renderer(window)
         tfactory = sdl2ext.SpriteFactory(sdl2ext.TEXTURE, renderer=renderer)
         sfactory = sdl2ext.SpriteFactory(sdl2ext.SOFTWARE)
 
     @unittest.skip("not implemented")
     def test_SpriteFactory_from_object(self):
         window = sdl2ext.Window("Test", size=(1, 1))
-        renderer = sdl2ext.RenderContext(window)
+        renderer = sdl2ext.Renderer(window)
         tfactory = sdl2ext.SpriteFactory(sdl2ext.TEXTURE, renderer=renderer)
         sfactory = sdl2ext.SpriteFactory(sdl2ext.SOFTWARE)
 
     def test_SpriteFactory_from_surface(self):
         window = sdl2ext.Window("Test", size=(1, 1))
-        renderer = sdl2ext.RenderContext(window)
+        renderer = sdl2ext.Renderer(window)
         tfactory = sdl2ext.SpriteFactory(sdl2ext.TEXTURE, renderer=renderer)
         sfactory = sdl2ext.SpriteFactory(sdl2ext.SOFTWARE)
 
 
         # Get text from a texture sprite factory
         window = sdl2ext.Window("Test", size=(1, 1))
-        renderer = sdl2ext.RenderContext(window)
+        renderer = sdl2ext.Renderer(window)
         tfactory = sdl2ext.SpriteFactory(sdl2ext.TEXTURE,
                                          renderer=renderer,
                                          fontmanager=fm)
         sprite = tfactory.from_text("Test", alias="tuffy")
         self.assertIsInstance(sprite, sdl2ext.TextureSprite)
 
-    def test_SpriteRenderer(self):
-        renderer = sdl2ext.SpriteRenderer()
-        self.assertIsInstance(renderer, sdl2ext.SpriteRenderer)
+    def test_SpriteRenderSystem(self):
+        renderer = sdl2ext.SpriteRenderSystem()
+        self.assertIsInstance(renderer, sdl2ext.SpriteRenderSystem)
         self.assertIsNotNone(renderer.sortfunc)
         self.assertTrue(sdl2ext.Sprite in renderer.componenttypes)
 
-    def test_SpriteRenderer_sortfunc(self):
+    def test_SpriteRenderSystem_sortfunc(self):
         def func(p):
             pass
 
-        renderer = sdl2ext.SpriteRenderer()
+        renderer = sdl2ext.SpriteRenderSystem()
         self.assertIsNotNone(renderer.sortfunc)
         renderer.sortfunc = func
         self.assertEqual(renderer.sortfunc, func)
         self.assertRaises(TypeError, setf, renderer, 1234)
 
     @unittest.skip("not implemented")
-    def test_SpriteRenderer_render(self):
+    def test_SpriteRenderSystem_render(self):
         pass
 
     @unittest.skip("not implemented")
-    def test_SpriteRenderer_process(self):
+    def test_SpriteRenderSystem_process(self):
         pass
 
-    def test_SoftwareSpriteRenderer(self):
-        self.assertRaises(TypeError, sdl2ext.SoftwareSpriteRenderer)
-        self.assertRaises(TypeError, sdl2ext.SoftwareSpriteRenderer, None)
-        self.assertRaises(TypeError, sdl2ext.SoftwareSpriteRenderer, "Test")
-        self.assertRaises(TypeError, sdl2ext.SoftwareSpriteRenderer, 12345)
+    def test_SoftwareSpriteRenderSystem(self):
+        self.assertRaises(TypeError, sdl2ext.SoftwareSpriteRenderSystem)
+        self.assertRaises(TypeError, sdl2ext.SoftwareSpriteRenderSystem, None)
+        self.assertRaises(TypeError, sdl2ext.SoftwareSpriteRenderSystem,
+                          "Test")
+        self.assertRaises(TypeError, sdl2ext.SoftwareSpriteRenderSystem,
+                          12345)
 
         window = sdl2ext.Window("Test", size=(1, 1))
-        renderer = sdl2ext.SoftwareSpriteRenderer(window)
-        self.assertIsInstance(renderer, sdl2ext.SpriteRenderer)
+        renderer = sdl2ext.SoftwareSpriteRenderSystem(window)
+        self.assertIsInstance(renderer, sdl2ext.SpriteRenderSystem)
         self.assertEqual(renderer.window, window.window)
         self.assertIsInstance(renderer.surface, SDL_Surface)
 
-        renderer = sdl2ext.SoftwareSpriteRenderer(window.window)
-        self.assertIsInstance(renderer, sdl2ext.SpriteRenderer)
+        renderer = sdl2ext.SoftwareSpriteRenderSystem(window.window)
+        self.assertIsInstance(renderer, sdl2ext.SpriteRenderSystem)
         self.assertEqual(renderer.window, window.window)
         self.assertIsInstance(renderer.surface, SDL_Surface)
 
         self.assertTrue(sdl2ext.SoftwareSprite in renderer.componenttypes)
 
     @unittest.skipIf(_ISPYPY, "PyPy's ctypes can't do byref(value, offset)")
-    def test_SoftwareSpriteRenderer_render(self):
+    def test_SoftwareSpriteRenderSystem_render(self):
         sf1 = SDL_CreateRGBSurface(0, 12, 7, 32, 0, 0, 0, 0)
         sp1 = sdl2ext.SoftwareSprite(sf1.contents, True)
         sdl2ext.fill(sp1, 0xFF0000)
         sprites = [sp1, sp2]
 
         window = sdl2ext.Window("Test", size=(20, 20))
-        renderer = sdl2ext.SoftwareSpriteRenderer(window)
-        self.assertIsInstance(renderer, sdl2ext.SpriteRenderer)
+        renderer = sdl2ext.SoftwareSpriteRenderSystem(window)
+        self.assertIsInstance(renderer, sdl2ext.SpriteRenderSystem)
 
         self.assertRaises(AttributeError, renderer.render, None, None, None)
         self.assertRaises(AttributeError, renderer.render, [None, None],
         del view
 
     @unittest.skipIf(_ISPYPY, "PyPy's ctypes can't do byref(value, offset)")
-    def test_SoftwareSpriteRenderer_process(self):
+    def test_SoftwareSpriteRenderSystem_process(self):
         sf1 = SDL_CreateRGBSurface(0, 5, 10, 32, 0, 0, 0, 0)
         sp1 = sdl2ext.SoftwareSprite(sf1.contents, True)
         sp1.depth = 0
         sprites = [sp1, sp2]
 
         window = sdl2ext.Window("Test", size=(20, 20))
-        renderer = sdl2ext.SoftwareSpriteRenderer(window)
+        renderer = sdl2ext.SoftwareSpriteRenderSystem(window)
 
         renderer.process("fakeworld", sprites)
         view = sdl2ext.PixelView(renderer.surface)
         self.assertRaises(TypeError, renderer.process, None, None)
 
     @unittest.skip("not implemented")
-    def test_TextureSpriteRenderer(self):
+    def test_TextureSpriteRenderSystem(self):
         pass
 
     @unittest.skip("not implemented")
-    def test_TextureSpriteRenderer_render(self):
+    def test_TextureSpriteRenderSystem_render(self):
         pass
 
     @unittest.skip("not implemented")
-    def test_TextureSpriteRenderer_process(self):
+    def test_TextureSpriteRenderSystem_process(self):
         pass
 
     def test_Sprite(self):
         SDL_DestroyWindow(window)
 
     @unittest.skip("not implemented")
-    def test_RenderContext(self):
+    def test_Renderer(self):
         pass
 
     @unittest.skip("not implemented")
-    def test_RenderContext_color(self):
+    def test_Renderer_color(self):
         pass
 
     @unittest.skip("not implemented")
-    def test_RenderContext_blendmode(self):
+    def test_Renderer_blendmode(self):
         pass
 
     @unittest.skip("not implemented")
-    def test_RenderContext_clear(self):
+    def test_Renderer_clear(self):
         pass
 
     @unittest.skipIf(_ISPYPY, "PyPy's ctypes can't do byref(value, offset)")
-    def test_RenderContext_copy(self):
+    def test_Renderer_copy(self):
         surface = SDL_CreateRGBSurface(0, 128, 128, 32, 0, 0, 0, 0).contents
         sdl2ext.fill(surface, 0x0)
-        renderer = sdl2ext.RenderContext(surface)
+        renderer = sdl2ext.Renderer(surface)
         factory = sdl2ext.SpriteFactory(sdl2ext.TEXTURE, renderer=renderer)
         w, h = 32, 32
         sp = factory.from_color(0xFF0000, (w, h))
         del view
 
     @unittest.skip("not implemented")
-    def test_RenderContext_draw_line(self):
+    def test_Renderer_draw_line(self):
         pass
 
     @unittest.skip("not implemented")
-    def test_RenderContext_draw_point(self):
+    def test_Renderer_draw_point(self):
         pass
 
     @unittest.skip("not implemented")
-    def test_RenderContext_draw_rect(self):
+    def test_Renderer_draw_rect(self):
         pass
 
     @unittest.skipIf(_ISPYPY, "PyPy's ctypes can't do byref(value, offset)")
-    def test_RenderContext_fill(self):
+    def test_Renderer_fill(self):
         surface = SDL_CreateRGBSurface(0, 128, 128, 32, 0, 0, 0, 0).contents
         sdl2ext.fill(surface, 0x0)
-        renderer = sdl2ext.RenderContext(surface)
+        renderer = sdl2ext.Renderer(surface)
         factory = sdl2ext.SpriteFactory(sdl2ext.TEXTURE, renderer=renderer)
         w, h = 32, 32
         sp = factory.from_color(0xFF0000, (w, h))