Ebiten: Use Metal on macOS

Created on 5 Jun 2018  路  7Comments  路  Source: hajimehoshi/ebiten

https://developer.apple.com/macos/whats-new/

Deprecation of OpenGL and OpenCL

macos

Most helpful comment

Current status: https://github.com/hajimehoshi/ebiten/blob/metal/internal/graphicsdriver/metal/driver.go Succeeded to render examples!

Screenshot from Gyazo

Most rendering part has been implemented.

Remaining tasks:

  • [x] [MUST] Pass all the tests

    • [x] [MUST] Blending function

    • [x] [MUST] Nearest/Linear filter

  • [x] [MUST] Correct memory management
  • [x] [MUST] Enable to switch vsync
  • [x] [MUST] Run all the examples correctly
  • [x] [MUST] Implement some missing functions (e.g. MaxImageSize)
  • [ ] [WANT] Better performance by synchronization
  • [ ] [WANT] Context lost? (Does this happen?)

All 7 comments

This would mean I would need to give up using GLFW.

https://github.com/kovidgoyal/kitty/issues/972

It looks like Apple is really deprecating OpenGL.

Current status: https://github.com/hajimehoshi/ebiten/blob/metal/internal/graphicsdriver/metal/driver.go Succeeded to render examples!

Screenshot from Gyazo

Most rendering part has been implemented.

Remaining tasks:

  • [x] [MUST] Pass all the tests

    • [x] [MUST] Blending function

    • [x] [MUST] Nearest/Linear filter

  • [x] [MUST] Correct memory management
  • [x] [MUST] Enable to switch vsync
  • [x] [MUST] Run all the examples correctly
  • [x] [MUST] Implement some missing functions (e.g. MaxImageSize)
  • [ ] [WANT] Better performance by synchronization
  • [ ] [WANT] Context lost? (Does this happen?)

Are you still using glfw 3.2 or something else for the window?

Yes, I'm still using GLFW 3.2 as 'No API' mode. The application runs with a Cocoa window without OpenGL initialization and context. Metal's rendering works on the Cocoa window.

For more details, @dmitshur's https://dmitri.shuralyov.com/gpu/mtl/example/movingtriangle is a great example.

Most of them are implemented. Now I'm fixing a bug that screen flickers on fullscreen mode.

EDIT: Fixed: the cause was multiple PresentDrawable call for the same Drawable object.

Now all the examples worked correctly!

Was this page helpful?
0 / 5 - 0 ratings