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

Metal: class type detection problem #6

Open
funatsufumiya opened this issue Jan 6, 2025 · 0 comments
Open

Metal: class type detection problem #6

funatsufumiya opened this issue Jan 6, 2025 · 0 comments

Comments

@funatsufumiya
Copy link

funatsufumiya commented Jan 6, 2025

Related to this code:

pd.nwh = info.cocoa.window

Probably because of wrapping (casting) pointer with nim, class type detection of init.platformData.nwh below seems to be failing on Metal backend (so finally becomes Noop backend), when interop with SDL2 or GLFW.

https://github.com/bkaradzic/bgfx/blob/7b3e1ebf626fc6ecb5ba777173c56dddac9a5726/src/renderer_mtl.mm#L3561

It's working when bypassing this process with modifying bgfx-shared-lib (by forcefully casting as NSWindow* in ObjC), so I think assigning init.platformData.nwh should be done by calling C code from Nim, in example code.

@funatsufumiya funatsufumiya changed the title Metal: class name detection problem Metal: class type detection problem Jan 6, 2025
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

No branches or pull requests

1 participant