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

internal/graphicsdriver/metal: remove C for macOS #2243

Merged
merged 39 commits into from
Aug 17, 2022

Conversation

TotallyGamerJet
Copy link
Contributor

No description provided.

@hajimehoshi hajimehoshi changed the title graphicsdriver/metal: remove C internal/graphicsdriver/metal: remove C Aug 13, 2022
Copy link
Owner

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

internal/cocoasdk/api_coregraphics_darwin.go Outdated Show resolved Hide resolved
internal/cocoasdk/nsinvocation_darwin.go Outdated Show resolved Hide resolved
internal/cocoasdk/nsinvocation_darwin.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/ca/ca_darwin.go Show resolved Hide resolved
internal/cocoasdk/nsmethodsignature_darwin.go Outdated Show resolved Hide resolved
internal/cocoasdk/nsmethodsignature_darwin.go Outdated Show resolved Hide resolved
internal/cocoasdk/nsinvocation_darwin.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/ca/ca_darwin.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/ca/ca_darwin.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/view_ios.go Outdated Show resolved Hide resolved
@hajimehoshi
Copy link
Owner

There seems an error in the testing bot:

# github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver/metal
Undefined symbols for architecture arm64:
  "_objc_msgSend", referenced from:
      _addSublayer in _x002.o
      _setFrame in _x002.o
ld: symbol(s) not found for architecture arm64

Copy link
Owner

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me test your PR on my MacBook Pro and iOS later. Thanks!

@hajimehoshi
Copy link
Owner

I found #2243 (comment) still exists. Please take a look, thanks

@TotallyGamerJet
Copy link
Contributor Author

yeah it wasn't linking to QuartzCore since that got removed from metal and wasn't in the iOS specific code.

Should hopefully be fixed now.

@hajimehoshi
Copy link
Owner

Other errors:

cannot use float64(width) (type float64) as type cocoa.CGFloat in field value

@TotallyGamerJet
Copy link
Contributor Author

Hmm I’m not sure why it’s complaining on iOS although I did just remember I was using a modified version of purego so I’ll create that PR tomorrow morning

@hajimehoshi
Copy link
Owner

Hmm I’m not sure why it’s complaining on iOS although I did just remember I was using a modified version of purego so I’ll create that PR tomorrow morning

So, we have to update purego in go.mod in this PR, right?

@TotallyGamerJet
Copy link
Contributor Author

Yes

@hajimehoshi
Copy link
Owner

Uh no sorry. I meant I like the consts one. What I wrote was very unclear

No problem, the const way is also fine!

@hajimehoshi
Copy link
Owner

I'll test this with actual devices tomorrow, thanks!

@hajimehoshi
Copy link
Owner

It seems like an iOS emulator and an actual iOS device worked with this PR. I'll double-check this PR as this is pretty big.

internal/cocoa/ios.go Outdated Show resolved Hide resolved
internal/cocoa/notios.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/ca/ca_darwin.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/mtl/mtl_darwin.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/mtl/mtl_darwin.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/mtl/mtl_darwin.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/mtl/mtl_darwin.go Outdated Show resolved Hide resolved
internal/graphicsdriver/metal/mtl/mtl_darwin.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@TotallyGamerJet
Copy link
Contributor Author

I would test on actual device again since I did a pretty big refactor. I moved the common OBJC objects into the cocoa package because they will be needed when ports the rest of Ebitengine

Copy link
Owner

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hajimehoshi hajimehoshi changed the title internal/graphicsdriver/metal: remove C internal/graphicsdriver/metal: remove C for macOS Aug 17, 2022
@hajimehoshi hajimehoshi merged commit 05470f7 into hajimehoshi:main Aug 17, 2022
@TotallyGamerJet TotallyGamerJet deleted the purego branch August 29, 2022 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants