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

Use Metal on macOS #621

Closed
hajimehoshi opened this issue Jun 5, 2018 · 7 comments
Closed

Use Metal on macOS #621

hajimehoshi opened this issue Jun 5, 2018 · 7 comments
Labels
Milestone

Comments

@hajimehoshi
Copy link
Owner

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

Deprecation of OpenGL and OpenCL

@hajimehoshi hajimehoshi added this to the v1.8.0 milestone Jun 5, 2018
@hajimehoshi hajimehoshi removed this from the v1.8.0 milestone Jul 15, 2018
@hajimehoshi hajimehoshi added this to the v1.9.0 milestone Sep 29, 2018
@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Oct 1, 2018

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

kovidgoyal/kitty#972

It looks like Apple is really deprecating OpenGL.

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Oct 16, 2018

I plan to use @dmitshur's https://dmitri.shuralyov.com/gpu/mtl

See also https://dmitri.shuralyov.com/blog/26

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Nov 22, 2018

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:

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

@Noofbiz
Copy link

Noofbiz commented Nov 22, 2018

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

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Nov 22, 2018

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.

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Dec 13, 2018

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.

@hajimehoshi
Copy link
Owner Author

Now all the examples worked correctly!

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

No branches or pull requests

2 participants