I have a HUD with a rectangle (glRect) on it. I want to be able to put a letter on it and see what's happening behind the rectangle but only where the text is rendered. Like putting a letter shaped hole in the rectangle.
Asked
Active
Viewed 67 times
0
-
Learn about using alpha component of the color (rectangle, text) and how to blend pixels. Pay attention to blending order and functions. – Ripi2 Sep 06 '17 at 16:17
-
use stencil (GL_STENCIL_TEST) for that see: [I have an OpenGL Tessellated Sphere and I want to cut a cylindrical hole in it](https://stackoverflow.com/a/39466130/2521214) or use transparency (GL_BLEND) – Spektre Sep 07 '17 at 05:56