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
832 -
1:27:39
The Quartering
5 hours agoKash Patel Talks Relationship Amid Manhunt, Trump's New Daughter-In-Law, and Michigan Football Chaos
98.1K8 -
1:21:08
DeVory Darkins
3 hours agoScott Bessent issues MAJOR Tax Update as JD Vance takes questions on the economy
111K40 -
LIVE
Dr Disrespect
7 hours ago🔴LIVE - DR DISRESPECT - ARC RAIDERS - NEW COLD SNAP UPDATE
1,401 watching -
19:13
Neil McCoy-Ward
3 hours agoJapan Just Lit The Fuse (Get Ready...)
3.5K3 -
1:03:37
Timcast
4 hours agoRepublicans Call For Mass EXPULSION Of Muslims, Travel BAN
171K124 -
1:14:15
Sean Unpaved
3 hours agoAaron Rodgers & Steelers BOUNCE BACK In WIN vs. Dolphins! | UNPAVED
19.3K4 -
DVR
Badlands Media
12 hours agoGeopolitics with Ghost Ep. 65 - December 16, 2025
22.5K1 -
1:49:22
Steven Crowder
6 hours agoCandace & Erika: What The Meeting Really Says About Conservative Media
464K384 -
16:28
Adam Does Movies
3 hours ago $0.47 earnedIT: Welcome To Derry Episode 8 Recap - What A Finale!
20.5K