PostProcessing in OpenGL

Hi people,

I’m doing some post processing in cuda using Pixel Buffer Object. As a reference, I get some code of the postprocessing example of the SDK. In there, the author uses GL_BGRA so, 1 byte for each componente. To extract the component colors, the author uses:

float r = float(pixel&0xff);

				float g = float((pixel>>8)&0xff);

				float b = float((pixel>>16)&0xff);

In my mind, the correct would be:

float r = float((pixel >> 8)&0xff);

				float g = float((pixel>>16)&0xff);

				float b = float((pixel>>24)&0xff);

But it doesn’t work. Someone knows why this occour?

Thanks a lot.

Jose Ricardo

Did you modify
device int rgbToInt(float r, float g, float B )