Colorizing a specific area on the screen.

BlitzMax Forums/BlitzMax Programming/Colorizing a specific area on the screen.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

CS_TBL, it comes closer, but it is not what i ment.

Let me try and explain it another time, but written:

Purple is made out of red and blue.
Yellow out of red and green.

So if i want to make this purple ball yellow, i substract blue, and add green.
What i dont want is have this done pre-computed, as i changed it realtime.

Basicly, i ill use it for effects such as:
Nightfall
Sunrise
Drakredish looking caves
Brightblueish looking water
etc....

The SetColor function, only takes the light & darkness, and forces all colors to turn red.

What i need is (as shown in the picture)
[img="http://www.fantasaar.com/rgbhsl.jpg"]

Is a function that ADDS or SUBSTRACTS blue, or red, or green, or both TO and FROM an area on the screen, in real-time.

In addition i would like to know if it is possible to ADD and SUBSTRACT anything at all?
Like, if i where on top of the colorization to add a darker layer or effect, like a vail, that only lights up when i have a torch. (which i then would want to have a yellowish looking radius but not make ALL look pure yellow, just by adding a bit green and red for that zone.)

What i expect, is that i have to render the whole backbuffer, lock it, apply the effects, unlock it, draw the HUD (which will not be effected) and FLIP it.

Thank you.