I am attempting to convert 32-bit pointers into rgba colors, draw objects to the back-buffer using the converted pointer as a color, retrieve the rgba value back from the back buffer, and convert this back to the pointer.
I am converting the 32-bit pointer into and unsigned byte rgba array. I have been inspecting the values as I set the color. For an example, I have a pointer that was converted to: r = 88, g = 255, b = 201, a = 16. I set this as the color and draw some objects. When I retrieve an rgba value from the back buffer, I get back correct results for the r, g and b values, but the alpha value keeps coming back as 255. Does anyone know what causes this?
Note that the above was done without GL_BLENDING enable. I did another experiment where I enabled GL_BLENDING and set the glBlendFunc as follows:
in order to guarantee that the my source color is what gets drawn to the back buffer. This, too, results in correct r, g and b values and 255 for the alpha. Any ideas?