/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

gustedt.wordpress.com
| | pagefault.se

Normally when writing OpenGL code, it can get very cumbersome/error-prone when defining how to pass vertex data to the GPU. As a given example, heres a toy vertex structure we want to tell OpenGL how to handle when it gets passed in as an array of data. struct Vertex3f2f { Vec3f pos; Vec2f uv; } With this, the following needs to be done to upload the data to the GPU with OpenGL (and it needs to change if the vertex structure changes, where making these changes by hand every time can easily lead to myster...
13.6 parsecs

Travel
| |
| | quuxplusone.github.io

Someone on the cpplang Slack asks: How can I view a std::pair<T, T> as if it were a range of two Ts? That is, fill in the blank in this sample program: template<std::ranges::range R> void increment_all(R&& rg) { for (auto&& elt : rg) { elt = elt + 1; } } template<class T> auto F(std::pair<T, T>& kv) { ~~~~ } int main() { std::pair<int, int> kv = {1, 2}; increment_all(F(kv)); assert(kv.first == 2 && kv.second == 3); std::ranges::fill(F(kv), 4); assert(kv.first == 4 && kv.second == 4); }
15.4 parsecs

Travel
| |
| | golangbot.com

A pointer is a variable that stores the memory address of another variable. This tutorial covers pointer declaration, dereferencing and various other topics with examples.
13.2 parsecs

Travel
| |
| | attractivechaos.wordpress.com

Array and hash table are probably the most important data structures. Some programming languages such as Perl, Lua and Javascript, almost build the language core on top of the two data structures. While array is straightforward to implement, hash table is not. This is why we have paid continuous efforts in improving the hash table...
30.2 parsecs

Travel
|