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 -
LIVE
Major League Fishing
4 days agoLIVE! - Fishing Clash Team Series: Heritage Cup - Day 1
1,251 watching -
18:40
itsSeanDaniel
6 hours agoPiers Morgan CALLED OUT and HUMILIATED by Andrew Tate
39.6K250 -
LIVE
Times Now World
2 days agoLIVE: "ON CAM: How the Charlie Kirk Shooter ESCAPED – Shocking New Footage Revealed!"
367 watching -
1:45:51
Game On!
1 day ago $11.12 earnedWise Guys Reveal NFL Week 2 BEST BETS Now
79.2K8 -
26:57
Robbi On The Record
2 days agoMouth Breathing Is Why You’re Exhausted | with Dr. Melanie Silvestrini
49.9K6 -
LIVE
Total Horse Channel
8 hours ago2025 Reno Snaffle Bit Futurity | Sunday Finals
97 watching -
40:44
SouthernbelleReacts
7 days ago $4.04 earned“Event Horizon (1997) Reaction | Hellraiser in Space with Sam Neill & Laurence Fishburne”
46.3K4 -
10:49
Artur Stone Garage
3 days ago $2.75 earnedI Spent $2000 on My Turbo Honda Civic Build (Before & After)
44.4K12 -
0:44
Danny Rayes
21 hours ago $4.51 earnedDid Someone Know It Was Going To Happen?
43K11