A common technique... :-)
I can think of a couple of ways to do it in OpenGL.
One is to use stencilling, another is to put your
pattern in a texture and use glAlphaFunc().
Stencilling can do much more than a simple mask effect,
though that's probably not useful to you.
Normally stencil doesn't use any extra memory because
it's stored in the same place as the OpenGL depth buffer.
/ O O \
\_____/ FTB. For email, remove my socks.
In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again. They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful. But it happens
every day. I cannot recall the last time something like
that happened in politics or religion.
- Carl Sagan, 1987 CSICOP keynote address