Coder Social home page Coder Social logo

SDL Port? about meka HOT 5 OPEN

ocornut avatar ocornut commented on August 15, 2024
SDL Port?

from meka.

Comments (5)

maxim-zhao avatar maxim-zhao commented on August 15, 2024

I had a brief look some time ago and it's going to be quite painful, Meka relies on Allegro functionality beyond rendering video and audio, for example config and resource loading and drawing primitives. The imgui port may well reduce some of this, though.

from meka.

ocornut avatar ocornut commented on August 15, 2024

I think we should aim for that. Allegro is a crumbling mess.
Part of my plan was to replace the gui with a skinned ImGui which would have the advantage of getting rid of pretty much every Allegro draw primitives everywhere in the code for tools/ui. From there the entirely of rendering would be quite portable.

We don't use Allegro for config, we don't even use it for "data/package" file anymore, the files are standalone png, etc. stb_image.h can load them very well. It would be quite easy after the GUI is replaced.

If you want to help that'd be great :)

from meka.

MikeDX avatar MikeDX commented on August 15, 2024

I wonder if we could start by including SDL (1 or 2, doesn't really matter which) just to render the display buffer, and the gradually move over the inputs and audio calls. There doesn't seem to be an "easy" way to change over all in one go as everything is a bit tangled in with the allegro defines and routines.

from meka.

ARoxdale avatar ARoxdale commented on August 15, 2024

We could try moving all the allegro calls behind a quasi-platform interface. That might make it easier to eventually crate alternative ports.
Allegro calls are fairly scattered throughout the code, but as an initial step they could be moved behind an API layer, so they are all in one place.

from meka.

ocornut avatar ocornut commented on August 15, 2024

My plan what to rewrite the UI and most of the rendering using Dear ImGui, make it look fairly similar and then 90% of the Allegro calls will be done and UI will be easier to work with and improve. From there it'll be very easier to switch to something like SDL.

from meka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.