of course you can do this in Cinder, it’s one of the most basic things one can do Here’s how you’d draw two, differently colored rectangles on top of each other:
// Using scoped variables, we can store the current color and blend mode,
// so we can restore it when we're done drawing.
// Set the current color to Red.
gl::ScopedColor scpColor( 1, 0, 0 );
// Draw a rectangle.
gl::drawSolidRect( Rectf( 50, 60, 400, 360 ) );
// Enable alpha blending and set the current color to 50% Blue.
// Note: we don't need another scoped variable.
gl::color( ColorA( 0, 0, 1, 0.5f ) ); // RGBA
// Draw another rectangle on top of the first one.
gl::drawSolidRect( Rectf( 100, 110, 450, 410 ) );
// The scoped variables will now go out of scope and restore
// the drawing color and blend mode to their original states.
To understand what’s happening, try to change the colors and opacity. For example, see what happens when you swap the red and blue: will the mixed color be the same? (Spoiler: no). What happens if you change the opacity to a value larger than 1? What happens if you draw more than two rectangles? What happens if you use
gl::ScopedBlendAdditive instead? (For a fun experiment, try additive blending when drawing a red, green and blue circle on top of each other).