At first, to avoid misunderstandings, opengl es works only with triangles.
I got a rectangle (triangle strip), is it possible to cut a round hole (or more holes) into that rectangle.
It’s all in 2d.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As an alternative to Tim’s solution, you can also use a custom fragment shader that cuts the holes:
You can define your holes using a mask texture or just (x,y)-coordinates and radii. Then you can simply
discard()your triangle fragments if they are inside a hole.The best solution might depend on the number of holes you want to have (a mask texture might be the easiest, most flexible approach, especially if you also want to have non-circular holes while the distance test might be good of you have only a few holes).