3D Graphics for Dummies
3D Graphics for Dummies Significant content “borrowed” from Dan Chang @ Nintendo NTD “with permission” Chris Ryan CppCon 2021 github.com/ChrisR98008/CppCon20213 3D Graphics for Dummies4 3D Graphics Dummies5 3D Graphics for Dummies6 3D Graphics for Dummies7 3D Graphics for Dummies8 3D Graphics for Dummies9 3D Graphics for Dummies10 3D Graphics for Dummies11 3D Graphics for Dummies12 3D Graphics Graphics for Dummies13 3D Graphics for Dummies14 3D Graphics for Dummies15 3D Graphics for Dummies Winding / Right Hand Rule Fingers curled in the order of the points, thumb points up Counter clockwise0 码力 | 79 页 | 4.61 MB | 5 月前3A Physical Units Library for the Next C++
issues with colliding built-in literals • for example: F (farad), J (joule), W (watt), K (kelvin), d (day), l or L (litre), erg, ergps – not collide with std::chrono::literals CppCon 2020 | A Physical issues with colliding built-in literals • for example: F (farad), J (joule), W (watt), K (kelvin), d (day), l or L (litre), erg, ergps – not collide with std::chrono::literals CppCon 2020 | A Physical average speed /// /// @param d distance in metres /// @param t time in seconds /// @return speed in metres per second /// constexpr double avg_speed(double d, double t) { return d / t; } CppCon 2020 | A0 码力 | 172 页 | 6.17 MB | 5 月前3Building a Coroutine-Based Job System Without Standard Library
a + b; co_return result; } tasksum4(int a, int b, int c, int d) { int ab = co_await sum(a, b); int cd = co_await sum(c, d); int result = co_await sum(ab, cd); co_return result; } Okay, time fancier function.. That adds four numbers together. And as we all know, if we want to add a, b, c, d together, we need to add ab together, add cd together and add their sums together. 67 void __sum_resume(void* a + b; co_return result; } task sum4(int a, int b, int c, int d) { int ab = co_await sum(a, b); int cd = co_await sum(c, d); int result = co_await sum(ab, cd); co_return result; } Customization 0 码力 | 120 页 | 2.20 MB | 5 月前3Taro: Task graph-based Asynchronous Programming Using C++ Coroutine
Code A B C D 5• TGPS encapsulates function calls and their dependencies in a top-down task graph What is Task Graph-based Programming System (TGPS) Code A B C D B A C D 6• TGPS encapsulates in a top-down task graph What is Task Graph-based Programming System (TGPS) Code A B C D B A C D Scheduler 7Why TGPS 1 Scheduler sched; 2 task_a = sched.emplace([](&){ 3 // Code block block C; 10 }); 11 task_d = sched.emplace([](&){ 12 // Code block D; 13 }); 14 15 task_a.precede(task_b); 16 task_a.precede(task_c); 17 task_b.precede(task_d); 18 task_c.precede(task_d); 19 20 sched.schedule();0 码力 | 84 页 | 8.82 MB | 5 月前3Back to Basics Casting
telling it to do so.Implicit Type Conversion Assignment Value* float f = -42.1234; -42.1234016 double d = f; -42.123401641845703 int i = f; -42 size_t s = f; 18446744073709551574 char c = f; Ö struct *64-bit MSVC v142Implicit Type Conversion Assignment Value* float f = -42.1234; -42.1234016 double d = f; -42.123401641845703 int i = f; -42 size_t s = f; 18446744073709551574 char c = f; Ö struct *64-bit MSVC v142Implicit Type Conversion Assignment Value* float f = -42.1234; -42.1234016 double d = f; -42.123401641845703 int i = f; -42 size_t s = f; 18446744073709551574 char c = f; Ö struct0 码力 | 117 页 | 1.57 MB | 5 月前3Why Loops End
the universe is eventually exhausted.🙂 I don’t know any reason beyond the cosmos. 🙂 Perhaps you’d like to be more specific? 😈 Will this loop end for some non-cosmological reason?🙂 That is very specific 1 + 1 + 1; + 1 template < char d1, char d0 > constexpr int operator""() interface { implementation; // … claim result == 10 * operator""<d1>() + operator""<d0>(); // … } 🤖 The interface for 1 + 1 + 1; + 1 template < char d1, char d0 > constexpr int operator""() interface { implementation; // … claim result == 10 * operator""<d1>() + operator""<d0>(); // … } ✅ ❌ 🤖 ✅ ❌ 🤖🤖 ✅0 码力 | 134 页 | 1.30 MB | 5 月前3A Crash Course in Calendars, Dates, Time, and Time Zones
den); // r1 = 1/60 It‘s all compile-time constants: intmax_t n { 1 }; intmax_t d { 60 }; using r1 = ratiod>; // Error7 Compile-Time Rational Numbers Arithmetic with ratio_add, ratio_subtract duration > d1; duration d1; Duration with ticks of 1 minute: duration > d2; Duration with ticks of a sixtieth of a second: duration > d3; Use of predefined duration d4;12 Durations – Operations Working with durations // Define 2 durations: // one expressed as minutes, the other as seconds. duration > d3 { 10 }; // = 10 minutes 0 码力 | 43 页 | 551.60 KB | 5 月前3Class Layout
class C { public: // access specifier int a; int b; private: // access specifier int c; int d; public: // access specifier int e; private: // access specifier int f; }; 13 Copyright © In practice, compilers did not (or very rarely) reorder member layout. 14 a b c d f e a b c d f e a b c d f e Copyright © 2020 by Stephen C. Dewhurst and Daniel Saks Non-Static Data Member These are legal. I saw this once… 15 a b c d f e a b c d f e a b d f c e c d f a b e Copyright © 2020 by Stephen C. Dewhurst and Daniel Saks 14 15Class0 码力 | 51 页 | 461.37 KB | 5 月前3Conan 2.1 Documentation
revision f1fadf0d3b196dc0332750354ad8ab7b Graph root conanfile.txt: /home/conan/examples2/tutorial/consuming_packages/simple_cmake_ ˓→project/conanfile.txt Requirements zlib/1.2.11#f1fadf0d3b196dc0332750354ad8ab7b necessary packages ---------- Requirements zlib/1.2.11#f1fadf0d3b196dc0332750354ad8ab7b:cdc9a35e010a17fc90bb845108cf86cfcbce64bf ˓→#dd7bf2a1ab4eb5d1943598c09b616121 - Download (conancenter) -------- Installing installed cdc9a35e010a17fc90bb845108cf86cfcbce64bf zlib/1.2.11: Downloaded package revision dd7bf2a1ab4eb5d1943598c09b616121 -------- Finalizing install (deploy, generators) ---------- conanfile.txt: Generator0 码力 | 694 页 | 4.13 MB | 1 年前3Conan 2.0 Documentation
revision f1fadf0d3b196dc0332750354ad8ab7b Graph root conanfile.txt: /home/conan/examples2/tutorial/consuming_packages/simple_cmake_ ˓→project/conanfile.txt Requirements zlib/1.2.11#f1fadf0d3b196dc0332750354ad8ab7b necessary packages ---------- Requirements zlib/1.2.11#f1fadf0d3b196dc0332750354ad8ab7b:cdc9a35e010a17fc90bb845108cf86cfcbce64bf ˓→#dd7bf2a1ab4eb5d1943598c09b616121 - Download (conancenter) -------- Installing installed cdc9a35e010a17fc90bb845108cf86cfcbce64bf zlib/1.2.11: Downloaded package revision dd7bf2a1ab4eb5d1943598c09b616121 -------- Finalizing install (deploy, generators) ---------- conanfile.txt: Generator0 码力 | 652 页 | 4.00 MB | 1 年前3
共 305 条
- 1
- 2
- 3
- 4
- 5
- 6
- 31