title: How to mask a set of vertecies with a drawn texture?
body: <p>I followed this tutorial (<a href="http://androidblog.reindustries.com/a-real-opengl-es-2-0-2d-tutorial-part-8-rendering-text/" rel="nofollow noreferrer">http://androidblog.reindustries.com/a-real-opengl-es-2-0-2d-tutorial-part-8-rendering-text/</a>) to render text in opengl es 2.0 using a texture atlas (image with lots of little subtextures). So if I draw a text it's just a bunch of squares with mapped on textures from the texture atlas. I made a picture to illustrate the method:</p>
  
  <p><a href="https://i.stack.imgur.com/MszFM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MszFM.png" alt="text rendered using texture atlas method"></a></p>
  
  <p>The red boxes are just to show that there are individual squares with textures on them.</p>
  
  <p>Now I wanted to mask this text to another square so that it looks something like that: </p>
  
  <p><a href="https://i.stack.imgur.com/XPYDW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XPYDW.png" alt="masked square"></a></p>
  
  <p>The things I draw before that shouldn't get masked, if theres a method that would do that. How would I accomplish that? </p>
  
  <p>I already tried a stencil but this just masked the squares and not the texture on them. I also thought about making a shader that uses two sets of vertecies(square to be masked and square to be textured) and mask them, but I don't know if that is even possible.</p>