Giter VIP home page Giter VIP logo

Comments (11)

emoon avatar emoon commented on May 18, 2024 4

Just a small update that I have a basic version up and running in https://github.com/emoon/rust_minifb/tree/metal-macos now. It needs a bunch of clean up and some proper sync setup but the gist of it is that it's working at least.

from rust_minifb.

emoon avatar emoon commented on May 18, 2024 1

0.11.0 has now been published with macOS backend rewritten using Metal. I will close this now but please re-open if you have any issues :)

from rust_minifb.

emoon avatar emoon commented on May 18, 2024

I tested this now and that seems to indeed be the case. I have no idea why but I will take a look at it. I'm currently a bit busy but I will start looking at it early next week.

from rust_minifb.

superdump avatar superdump commented on May 18, 2024

FYI, I just rebuilt a C++ program I had using the C++ minifb and that has the same issue using mfb_update(). I would guess something changed in the macOS APIs.

from rust_minifb.

emoon avatar emoon commented on May 18, 2024

Yeah. The Rust version is using the same APIs so I'm sure it's something that has changed so I will need to investigate it

from rust_minifb.

superdump avatar superdump commented on May 18, 2024

I poked one of the SDL devs (credit: Ryan Gordon) and they suggested that "Rendering needs to happen in its own CoreAnimation layer or it won't work anymore". The SDL fix is here (Ryan highlighted the wantsUpdateLayer part): https://hg.libsdl.org/SDL/rev/86dcfbbcacaf

from rust_minifb.

emoon avatar emoon commented on May 18, 2024

Thanks! I will try to fix this as soon as I can

from rust_minifb.

emoon avatar emoon commented on May 18, 2024

I looked into this but still can't really figure out how to get it to work. I will ask around a bit and try to figure it out

from rust_minifb.

superdump avatar superdump commented on May 18, 2024

https://developer.apple.com/videos/play/wwdc2018/209/ at 22:40 they start talking about layer backing changes in Mojave. Transcript here: https://asciiwwdc.com/2018/sessions/209 . Search for layer and you should find it pretty quickly.

from rust_minifb.

emoon avatar emoon commented on May 18, 2024

Thanks. I looked at it but it still doesn't explain exactly what I need to change. I tried some various thing of using wantsLayerUpdate and I get a single call to layerUpdate

so that doesn't get my any closer compared to where drawRect was. I have been searching the net to find something that explains the steps I need to take but I haven't found anything that fully shows it yet

from rust_minifb.

emoon avatar emoon commented on May 18, 2024

I'm considering rewriting this to use Metal instead. It should sort out some other issues #28 and #30 as well while doing it. That means it will require 10.11 (El Capitan) which I think is fine

from rust_minifb.

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.