Post

Replies

Boosts

Views

Activity

Input with Metal-CPP, overriding MTK::View
Hi, I am new to Metal and macOS development, and trying to learn Metal with the CPP wrapper for a toy rendering engine. I am mostly following the "Learn Metal with C++" sample code. I am trying to read mouse and keyboard input. It seems like the Objective-C or Swift wrappers allow you to override your own MTK::View class, and then override the respective keyDown(), keyUp() methods. However, when looking at the CPP wrapper, MTK::View doesn't have any virtual functions to override. How can I read mouse and keyboard inputs in my application? Hopefully without having an Objective-C bridge. Thank you, Robin
4
1
3.6k
Apr ’23
Input with Metal-CPP, overriding MTK::View
Hi, I am new to Metal and macOS development, and trying to learn Metal with the CPP wrapper for a toy rendering engine. I am mostly following the "Learn Metal with C++" sample code. I am trying to read mouse and keyboard input. It seems like the Objective-C or Swift wrappers allow you to override your own MTK::View class, and then override the respective keyDown(), keyUp() methods. However, when looking at the CPP wrapper, MTK::View doesn't have any virtual functions to override. How can I read mouse and keyboard inputs in my application? Hopefully without having an Objective-C bridge. Thank you, Robin
Replies
4
Boosts
1
Views
3.6k
Activity
Apr ’23