JeGX HackLAB


Archive for the ‘Programming’ Category

(Switching to the Mac) Quelques Combinaisons de Touches pour Developpeurs

without comments

Written by JeGX

October 25th, 2012 at 4:28 pm

Live Coding

without comments

Written by JeGX

November 23rd, 2011 at 4:30 pm

Posted in Programming

Tagged with , ,

Les Sampler States OpenGL 3.3: Configurer les Unités de Texture

with 3 comments

Written by JeGX

September 8th, 2011 at 12:33 pm

Programming – Misc Links

without comments

Written by JeGX

May 17th, 2011 at 8:10 pm

Posted in Programming

Tagged with , , , ,

offsetof macro in C

without comments

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);

[via]

Written by JeGX

April 27th, 2011 at 1:28 pm

Posted in Programming

Tagged with , , ,

FreeImage: Erreur de Compilation Sous Ubuntu 10.10

without comments

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

Read the rest of this entry »

Written by JeGX

October 7th, 2010 at 8:21 pm

Geometry Instancing en OpenGL: le Presque Retour!

without comments

OpenGL geometry instancing
80,000,000 de polygones… c’est cool l’instancing!


Read the rest of this entry »

Written by JeGX

June 25th, 2010 at 1:20 pm

(GeeXLab) Bump Mapping et Self Shadow

without comments

GeeXLab demo
Bump mapping – front face


Read the rest of this entry »

Written by JeGX

August 3rd, 2009 at 4:26 pm

HowTo: Matrice de Projection Perspective en OpenGL

with 2 comments

Written by JeGX

July 28th, 2009 at 9:48 am

HowTo: Solutionner l’Erreur “The application failed to initialize properly (0xc0150002)”

with 4 comments

Written by JeGX

July 23rd, 2009 at 3:56 pm