Premium Only Content

Function Pointers (InputManager Class) | C++ in 2021
In this lesson, I guide you through using c ++ function pointer and lambdas to store and invoke callbacks from anywhere in your applications.
This is demonstrated through a mock Input Manager that you might find in a game engine implementation.
We start off by mocking out the manager, support accepting c ++ function pointers and then enhancing the class to accept a wider set of functions using std::function and lambdas.
Professional C++ by Marc Gregoire: https://amzn.to/3h4HGmW
Chapters:
0:00 Intro
1:10 Designing the implementation
3:25 Creating the InputManager class
6:10 C Function Pointer
7:54 Continuing InputManager Implementation
11:15 Demonstrating Callbacks (Function Pointer)
15:20 std::function
16:50 std::bind - Binding object member function
23:45 C++ Lambdas (introduction, templates, auto)
31:45 Bound Lambdas (capturing `this`)
34:01 BONUS -- Blocking Input layers
___
Godot Dragonbones is a custom Godot engine build with the godot_dragonbones module that I am maintaining and distributing. It provides full-featured, 2D Skeletal animation support for the DragonBones API; a free, open source alternative to Spine: 2D Skeletal Animation.
PLEASE SUBSCRIBE!
https://cutt.ly/zdCef9v
JOIN OUR DISCORD:
https://discord.gg/bXMkFsg
DONATE HERE:
https://cutt.ly/zdCnvmj
GET GODOT DRAGONBONES HERE (Windows, Linux, Mac):
http://godotdragonbones.com
Godot-Dragonbones module included with this build of engine:
https://github.com/mauville-technologies/godot-dragonbones
If you're interested in using this in your projects but would like more guidance, leave a comment letting me know what you'd like me to explain next.
-
1:37:39
Ozzadar - Game Development
3 years agoVulkan Vertex + Index Buffers | Cross Platform Game Engine Development
772 -
4:18:44
Donut Operator
4 hours agoCRIME/ HAPPY 4TH / MP7 IS MINE
68.6K6 -
LIVE
RalliedLIVE
2 hours ago $2.93 earnedDoc & Ral DOMINATE DUO WARZONE
278 watching -
10:39
NikkoOrtiz
1 hour agoCooked TikTok Fails... Part 2
6.29K4 -
1:45:24
Film Threat
1 day agoJURASSIC WORLD: REBIRTH! FOURTH OF JULY REVIEW SPECIAL! | Film Threat Livecast
24.5K2 -
3:20
LadyDesireeMusic
4 hours ago $2.94 earnedGod Bless America Patriotic Piano | MAGA | Happy Independence Day | Happy 4th of July | Relaxing
20.7K11 -
53:38
Flyover Conservatives
14 hours agoAmerica's Near Death Experiences. The Times We Almost Lost Our Nation - Historian Bill Federer | FOC Special Show
36.1K5 -
44:25
The Mel K Show
4 hours agoMORNINGS WITH MEL K - Declaration of Independence 2025: Liberty, Freedom & Gratitude 7-4-25
33.5K25 -
40:29
The Tom Renz Show
3 hours ago4th of July Special - America's Independence
19.5K9 -
2:59:48
Wendy Bell Radio
11 hours agoGod Bless America
133K110