Archive for the ‘Programming’ Category
(Switching to the Mac) Quelques Combinaisons de Touches pour Developpeurs
Live Coding
Les Sampler States OpenGL 3.3: Configurer les Unités de Texture
Programming – Misc Links
- Petite librairie pour le rendu de texte en mode bitmap avec OpenGL 3+ (core profile): VSFL – Very Simple Font Library
- Nouveau language de scripting. A tester un de ces quatres (dans une autre vie surtout!) dans GeeXLab: Cyrus Script
offsetof macro in C
I just discovered this macro available in C: offsetof. Here is an simple example:
struct { char a; int b; char c; } example; struct example s1; unsigned int offset; offset = (unsigned int)(&(((example *)(0))->b)); |
Thanks to offsetof (in the header stddef.h), the last line can be rewritten in:
unsigned int offset; offset = offsetof(example, b); |
FreeImage: Erreur de Compilation Sous Ubuntu 10.10
La compilation de la librairie FreeImage 3.14.1 sous Ubuntu 10.10 gènère cette erreur:
In file included from Source/OpenEXR/IlmImf/ImfChromaticities.h:47, from Source/OpenEXR/./IlmImf/ImfChromaticities.cpp:43: Source/OpenEXR/Imath/ImathMatrix.h: In constructor ‘Imath::Matrix44::Matrix44() [with T = float]’: Source/OpenEXR/./IlmImf/ImfChromaticities.cpp:110: instantiated from here Source/OpenEXR/Imath/ImathMatrix.h:1813: error: ‘memset’ was not declared in this scope








