4 ms·
A flight simulator called fly8 had an interesting C structure made of pointers to functions. It was a way to declare a device driver in C. Years later I could
by eb0la 4y ago
A flight simulator called fly8 had an interesting C structure made of pointers to functions.
It was a way to declare a device driver in C.
Years later I could tell my colleagues how a device driver/plugin actually worked (before COM/etc) just with this.
- Phrodo_00 4y agouefi's boot services are pretty much implemented this exact way.
- dividuum 4y agoI’ve first seen this in the Quake 2 source as a way to dynamically load the render code, e.g. software/gl: the structs exchanged can be seen here https://github.com/id-Software/Quake-2/blob/372afde46e7defc9dd2d719a1732b8ace1fa096e/client/ref.h#L131 https://github.com/id-Software/Quake-2/blob/372afde46e7defc9...