how to mask out colors I need?
I have an OpenGL DC with a picture drawn on it. The picture has backgroud color BgColor. I want to draw on this DC a polygon with color PolyColor, so that any pixel under this polygon which is equal to BgColor, will PolyColor. If a pixel color is equal to PolyColor, it must be inversed. The picture is a some lines and rectangles drawn on BgColor. The problem, that I get ready image, and do not draw it myself. So I can't use any buffers (stensil, accumulate, etc.). And I can't find any function, which converts any color to a color I need. Only color's components, that doesn't much for me. In short, if somebody knows how to help me or where I can ask this question or find any usefull info, please tell me.