G-Truc
g-truc.net · Personal blog · on HN since 2010
G-Truc is the site of the author of GLM, covering OpenGL, GPU details, shading languages, and C++ compiler support.
What HN saysHN links it as a source for graphics programming and C++ posts, including a C++11 countof implementation and driver and compiler status reports.
15HN people shared it
7linked it in comments
8stories submitted
101story points
1 year agolast shared
2010people per year2026
Most-shared posts
- 1Rasterisation patterns of the Haswell GPU2 people · 64 points · first shared 2013 · 13 comments on HN
- 2Redefining the shading languages ecosystem with SPIR-V2 people · 17 points · first shared 2015 · discussion on HN
- 3Better array 'countof' implementation with C++ 112 people · 1 points · first shared 2015 · discussion on HN
- 4Modern C++ features compiler comparison [pdf]1 people · 6 points · first shared 2015 · discussion on HN
- 5OpenGL Drivers Status, since 20121 people · 4 points · first shared 2015 · discussion on HN
- 6Compilers status: Visual Studio, GCC and LLVM1 people · 4 points · first shared 2011 · discussion on HN
- 7OpenGL 4.1 review1 people · 3 points · first shared 2010 · discussion on HN
- 8January 2015 C++ Compilers Status1 people · 2 points · first shared 2015 · discussion on HN
- 9Post 06621 people · first shared 2025
- 10OpenGL%20status%202013 04.pdf1 people · first shared 2013
- 11Homepage1 people · first shared 2013
- 12OpenGL%20Drivers%20Status.pdf1 people · first shared 2017
What HN people wrote when they linked it
thelinked · 2013-09-26
Here are some blogs.
http://hacksoflife.blogspot.com/
http://fgiesen.wordpress.com/
http://www.g-truc.net/
corysama · 2014-01-07
Way back on the original Xbox and PlayStation2, the framebuffer and the textures were in the same memory space. And coincidentally, because you had complete control over the machine, you could construct a texture using any memory address --including that of the framebuffer! This was very not recommended. Both the internal memory layouts and the order-of-operations of memory reads and writes from different pixel operations were explicitly undefined in every hardware graphics API ever so that different GPUs could be free to have wildly different implementations. Here are some examples: http://www.youtube.com/watch?v=ZJU_CO6gRfs and http://www.g-truc.net/post-0597.html
On the consoles, the memory formats and layouts were well defined, but the order of operations were not. And indeed, if you tried to draw anything that wasn't a pointless memcpy(src, src, sizeof(src)) while using the framebuffer as a source texture, you would get random, rectangular and z-shaped (morton order) glitches because of out-of-order operations stemming from the aliased source and dest buffers.
However... My goal was a blurry, streaky, screen distortion effect in the weapon trails --to look like the blades were so awesome they caused refraction by cutting the air ;) I found that by sampling the framebuffer from four locations along the weapon's line of motion, the glitches were blurred and streaked out to the point that they really were not objectionable :D
To do the effect according to the…
spookie · 2025-05-20
This is by far the biggest culprit OP, look into this.
You can try to come up with imposters representing these far away dragons, or simple LoD levels. Some games do use particles to represent far away and repeated "meshes" (Ghost of Tsushima does these for soldiers far away).
Lot's of techniques in this area ranging from simple to bananas. LoD levels alone can get you pretty far! Of course, this is at the cost of having more different draw calls, so it is a balancing game.
Think about the topology too, hope these old gems helps getting a grasp on the cost of this:
https://www.humus.name/index.php?page=Comments&ID=228
https://www.g-truc.net/post-0662.html
netule · 2017-02-07
Not only that, but Apple seems to have decided to stop supporting open graphics standards altogether, including OpenGL [1]. Apple used to be quite vocal and influential as part of the ARB, not sure what caused the shift of the last few years.
[1] https://www.g-truc.net/doc/OpenGL%20Drivers%20Status.pdf
Tempest1981 · 2016-12-26
A more detailed article here: http://www.g-truc.net/post-0708.html
with a cleaner way to do _countof using a template in C++ 11.
You can also use the template technique to pass a fixed size array to a function, and have the function determine the array size (without needing a 2nd length param, or null terminator element). Similar to strcpy_s(): http://stackoverflow.com/questions/23307268/how-does-strcpy-s-work
MSVC has a built in _countof: http://stackoverflow.com/questions/4415530/equivalents-to-msvcs-counto…
shmerl · 2015-03-04
An interesting article about it: http://www.g-truc.net/post-0714.html
I wonder in general will Apple and MS support SPIR-V or they'll play nasty and not support it just to make life harder for everyone?
Also, will Apple push Metal to OS X, or they'll support Vulkan going forward? Their support for OpenGL was very much lagging behind.
zokier · 2013-09-26
g-truc.net tests desktop opengl status regularly. This is the report from last spring:
http://www.g-truc.net/doc/OpenGL%20status%202013-04.pdf
I suppose same methodology could be applied to mobile drivers too.