I'm trying to use the stencil buffer to mask text outside of a set region. Below are the commands run in ESE. My intuition was that the text could be treated as a rectangular box which appears incorrect. I'm assuming the issue is related to how the font's bitmap cells may be overlapping?
- Any explanation of how the stencil buffer is being incremented with regards to a font's bitmap cells and why there appears to be artifacts from some of these cells?
- How can I achieve the desired effect shown in RECTS Ref 1 but with text?
Code Select
CLEAR_COLOR_RGB(128,128,128)
CLEAR(1, 1, 1)
STENCIL_OP(INCR, INCR)
COLOR_A(128)
BEGIN(RECTS)
VERTEX2F(720, 576)
VERTEX2F(16383, 9600)
END()
COLOR_A(255)
STENCIL_FUNC(GEQUAL, 0, 255) // Ref 0-4
COLOR_RGB(96,96,96)
BEGIN(RECTS)
VERTEX2F(720, 0)
VERTEX2F(1504, 1152)
END()
COLOR_RGB(255,255,255)
//BEGIN(RECTS)
//VERTEX2F(0, 768)
//VERTEX2F(1504, 960)
//END()
CMD_TEXT(0, 36, 30, 0, "TESTS")