Is there a way to add color’s value on pixel (Instead of settings) when drawing?
My pesudo code for example:
//DrawPixel( int x, int y, Color color ); - Puts pixel to color buffer with specific place.
DrawPixel( 0, 0, Red );
DrawPixel( 0, 0, Green );
And after I execute this code, the 0,0 pixel’s color is the result of Red+Green. (Yellow)
I don’t talk only about drawing pixels or blend. Is there a way in OpenGL to make it done?
Yes there is. It’s called GL_FUNC_ADD. In addition to transparency there are a handful of other useful blending functions.
In earlier opengl versions
Gl.BlendFunc(Gl.SRC_COLOR,Gl.DST_COLOR) might just do the trick.