Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the other renderers #282

Open
ElectricCoffee opened this issue May 4, 2019 · 5 comments
Open

Add support for the other renderers #282

ElectricCoffee opened this issue May 4, 2019 · 5 comments

Comments

@ElectricCoffee
Copy link
Contributor

I can see that TCOD_RENDERER_SDL2 and TCOD_RENDERER_OPENGL2 are both missing from the library, despite existing in the original C++ lib.

Is this intentional?

@HexDecimal
Copy link

Those renderers were added in libtcod 1.8 and 1.9 respectfully. Are these versions supported by tcod-rs? If not then is there anything that can be done to libtcod to make it easier for tcod-rs to upgrade?

@ElectricCoffee
Copy link
Contributor Author

I don't see it being an issue to upgrade it. The FFI is relatively straightforward (as far as I could tell through minimal digging), so it should just be a matter of updating the relevant bits of the FFI and implement it all into the larger system.

That said, I don't know how much libtcod has changed since. So it might not be as trivial as it seems.

@HexDecimal
Copy link

I think the worst break was in libtcod 1.6.2 which took out two functions relating to keyboard repeat which wasn't a feature anymore in SDL2. That prevented some older projects from upgrading, so I reintroduced them as stubs in a later version.

Everything important should be in libtcod's official changelog.

@tomassedovic
Copy link
Owner

tcod-rs (or specifically, tcod-sys which provides the bindings) is using libtcod 1.6.3.

There's no strong reason for this other than no one showed up willing to do the work of upgrading it. And people weren't asking for any of the new features either. I've not followed the libtcod development recently, so I don't know whether there are any nasty surprises in store.

One thing to note is that given the potential for breakage, I would not be comfortable merging this until I've heard confirmation from Windows and macOS folks (I can do Linux) that it all works fine. I don't own a Mac and while I could verify a Windows (7) build, it would take a long time.

So I'm all for this, but be aware that it might take a while to get it all merged. I'll be happy to guide you through the upgrade.

@ElectricCoffee
Copy link
Contributor Author

I'm only asking about this because the new renderers have better support for more advanced textures.
The whole thing was sparked when I had issues getting some Dwarf Fortress fonts to work properly.
The default shader refuses to treat shadows correctly, and the other two just resulted in runtime errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants