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
792 -
1:09:26
Glenn Greenwald
4 hours agoTrump's Shifting Immigration and H-1B Policies: With Journalist Lee Fang and Political Science Professor Ron Hira | SYSTEM UPDATE #515
112K12 -
LIVE
LFA TV
23 hours agoLFA TV ALL DAY STREAM - MONDAY 9/15/25
790 watching -
54:12
Donald Trump Jr.
3 hours agoCharlie's Vision. Our Future. | TRIGGERED Ep274
143K103 -
1:03:35
BonginoReport
4 hours agoKirk’s Alleged Killer Dating Hateful Transgender??? - Nightly Scroll w/ Hayley Caronia (Ep.134)
80.4K99 -
1:01:12
The Nick DiPaolo Show Channel
6 hours agoKirk Assassination Exposes Insane Left | The Nick Di Paolo Show #1793
50.7K19 -
1:48:38
The Mike Schwartz Show
4 hours agoTHE MIKE SCHWARTZ SHOW Evening Edition 09-15-2025
24.1K11 -
LIVE
LIVE WITH CHRIS'WORLD
6 hours agoLIVE WITH CHRIS'WORLD - They Just Created 1 Million Charlie Kirks
100 watching -
DVR
Quite Frankly
7 hours agoStaggering Evil, Official Stories & Open Lines | Rich Baris 9/15/25
22.7K5 -
1:09:33
TheCrucible
5 hours agoThe Extravaganza! EP: 36 (9/15/25)
166K18