Giter Site home page Giter Site logo

Integration with SDL1/2? about quesa HOT 4 CLOSED

a-hurst avatar a-hurst commented on July 17, 2024
Integration with SDL1/2?

from quesa.

Comments (4)

jwwalker avatar jwwalker commented on July 17, 2024

I don't really know anything about SDL other than the fact that it's a cross-platform library. Presumably it's implemented using native capabilities of each platform, e.g., NSView on macOS. So I think what you'd have to do is see whether SDL has APIs that will reveal the underlying platform-specific constructs, and them pass them to Quesa.

from quesa.

a-hurst avatar a-hurst commented on July 17, 2024

I think you can probably get at the underlying windowing stuff with some platform-specific hacks, but it makes portability a pain.

Is the issue just that the window/context creation code and rendering code in Quesa are intertwined in a way that makes it hard to use Quesa’s OpenGL renderer with a window and context created by a different library? If that’s the case I might attempt writing an SDL platform back-end for Quesa: glancing through the source, it looks
like the main platform-specific code is found in the Development/Source/Platform directory and get wrapped in various parts of Development/Source/Core. A lot of the stuff getting wrapped (draw context creation, file handling, logging, etc.) is stuff that SDL already wraps cleanly anyway, so it’d just be mapping the APIs onto eachother. Are there any major pitfalls or quirks I should watch out for if attempting to add a new platform backend?

from quesa.

jwwalker avatar jwwalker commented on July 17, 2024

Quesa has a different draw context class for each kind of platform view/window, so one task would be to create a new draw context class. But the more involved thing is letting the renderer know how to deal with each draw context class. See particularly the file GLDrawContext.cpp. For instance you'll find the function GLDrawContext_New, which looks at what kind of draw context it's dealing with and then figures out how to create an OpenGL drawing context.

from quesa.

jwwalker avatar jwwalker commented on July 17, 2024

SDL is not currently a priority for me, but there is some SDL support in Jorio's fork.

from quesa.

Related Issues (7)

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.