View Full Version : Obating an XRay effect

09-09-2009, 02:43 AM
i am working on a medical software project i am facing a problem
i render a number of give slices from a volume dataset and i need to apply a blending on them to have an X-ray image effect, but i didn't succeeded.
i have done this at past using delphi and an opengl extenstion library known as DGL using this code:
glBlendColorEXT(1.0, 1.0, 1.0, 1.0/npicNum);

now i am using Visual Studio 2008 C++ and opengl ihave used the GLEW extension but i didn't find the similar method and constants that do the same effect as with the delphi.
Kindly, if any one have any suggestion it will be appreciated.

09-09-2009, 04:51 AM
for constants, be sure to get glext.h and for glBlendColorEXT one can use GLEW or Glee if you don't want to get the pointer yourself.

For reference :

Ilian Dinev
09-09-2009, 06:46 AM
glBlendFunc(GL_ONE, GL_ONE); // additive blending

could be useful.

09-14-2009, 01:28 AM
For the GLEW does it support 64-bit as icompiled it using VC++ 9 x64 and i get a linkage error due to the presence of the glBlendColorEXT method

09-16-2009, 06:19 PM
glBlendFunc(GL_ONE, GL_ONE); // additive blending

could be useful.

Correct, this is what you need for an x-ray effect, or glBlendFunc(GL_SRC_ALPHA, GL_ONE); depending on whether your intensity is stored in color or alpha (or both).