JeGX HackLAB


Archive for the ‘Programming’ Category

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 3 comments

Written by JeGX

July 23rd, 2009 at 3:56 pm

[English]Depth of Field[/English][French]Depth of Field[/French]

without comments

[English]
I played with Depth Of Field (DoF) these last days in the upcoming Demoniak3D but I’m not very satisfied because I still have some problem to control the focus (the non blurred part of the field of view). Depth of field is done in a post processing step and uses the scene color and depth maps as only inputs (no multiple render targets). Here is a first preview:


I will continue my experimentations up to get a functional DoF and will add the support of MRT (multiple render targets) in the post processing effects (MRT will allow me to explore another cool effect: SSAO…).
[/English]
[French]
Ces derniers jours j’ai fait quelques tests de Depth Of Field (DoF ou Profondeur de Champ) avec le nouveau Demoniak3D mais je ne suis pas satisfait du resultat car j’ai encore quelques petits soucis pour controler le focus (la zone du champ de vision qui est nette). Le Depth of field est fait dans une étape de post processing et utilise comme seules entrées la texture de couleur de la scene (scene map) et celle de la profondeur (depth map). Cet algo n’utilise pas les MRT (multiple render targets). Voilà un petit aperçu:


Je vais continuer mes expérimentations jusqu’à obtenir un DoF opérationnel et ajouter la gestion des MRT (les MRT me permettront d’explorer un autre effet bien sympa: le SSAO…).
[/French]

Written by JeGX

July 17th, 2008 at 8:09 am