Skip to content

SDL renderer backend #920

Open
Open

Description

@mardy

Hi there!
I was considering the idea of porting this game to the Nintendo Wii, but it looks like it isn't doable right now, since there is no OpenGL library for the Wii.

I had a look at the renderer.hpp file, and at first sight I didn't find anything in there that would not be possible to implement using the SDL_Renderer API (please correct me if I'm wrong). It would be nice if the renderer was reimplemented using the SDL_Renderer API, because then it would be portable to any platform which supports SDL2. I found issue #907 about the 3DS, for instance.

Activity

  1. lethal-guitar commented on Mar 22, 2024

    @lethal-guitar
    Owner

    Hi, nice, that'd be really cool to see it running on a Wii 🙂 It would indeed be great to have the option for solely SDL-based rendering for increased portability. It's not quite as straightforward as it may seem at first though:

    I had a look at the renderer.hpp file, and at first sight I didn't find anything in there that would not be possible to implement using the SDL_Renderer API

    While the majority of the interface could easily be implemented using SDL_Renderer, there are certain special effects (white damage flash for sprites, underwater effect, cloak powerup translucency effect) which need custom shaders. On top of that, map tile rendering uses VBOs for efficiency.

    For reference, see:
    https://github.com/lethal-guitar/RigelEngine/blob/master/src/engine/graphical_effects.cpp

    : pRenderer->createVertexBuffer(data.mVertices);

    That being said, there are definitely ways around this. The tile rendering used to be more straightforward earlier in the project, so you could revert that part of the code to before the changes were made (the relevant commit: 3fe48b8).

    As for the special effects, those could also be implemented on the CPU to avoid the need for dedicated shaders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions