Hi ,
Trying to draw 3 polygons (Red , Green , Blue) overlapping each other to get the RGB color space using blending but cant get it to work. Any ideas. I am using
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
There are far easier ways to compute the colorspace than using alpha blending. Computing it directly, for example, is much simpler, and it doesn’t rely on rendering. You can simply create a bitmap and fill it with the appropriate colors.
consider dots(.) as white spaces and horizontal and vertical lines as polygon boundary lines.
I need the zone denoted by ‘W’ in figure to be white when I do blending.
What value of alpha should I use in glclearcolor. Seems it does not matter. I am using :
glClearColor(1.0,1.0,1.0,1.0);
When I set white background with alpha value 0 or 1 , and blending is turned ON, why does Red not Red anymore, it brightens. I would think that blending would work only when a polygon is being drawn above some other polygon. Is there a way to control this behaviour. Am I confusing this with shineness ?
Thanks
DPS
[This message has been edited by dpsv (edited 12-28-2001).]
[This message has been edited by dpsv (edited 12-28-2001).]
Hi ,
Just figured out that using blending I can never get a white color , which means I cannot create a color space. Its because the value of RGB colors will keep on decreasing and will make a black color eventually.