13.07.2015 Views

What is path rendering?

What is path rendering?

What is path rendering?

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Path Rendering Example (3 of 3)Render star with non-zero fill styleStencil <strong>path</strong>glStencilFillPathNV(<strong>path</strong>Obj, GL_COUNT_UP_NV, 0x1F);Cover <strong>path</strong>glEnable(GL_STENCIL_TEST);glStencilFunc(GL_NOTEQUAL, 0, 0x1F);glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);glColor3f(0,1,0); // greenglCoverFillPathNV(<strong>path</strong>Obj, GL_BOUNDING_BOX_NV);Alternative: for even-odd fill styleJust program glStencilFunc differentlyglStencilFunc(GL_NOTEQUAL, 0, 0x1); // alternative masknon-zero fill styleeven-odd fill style

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!