hi! i would like to be able to fill a shape (circle, rect, etc) with a pattern rather than a solid color. from looking at the documentation there doesn’t appear to be a straightforward way to accomplish this. any suggestions on how i could go about doing this?
the pattern assets that i have are currently in SVG format, but i can convert them to something else if that simplifies the task.
since 0061 there’s some methods in ofTexture to make this easier.
the idea is that you need to draw your shape and pass to opengl the corresponding coordinates in the texture for each vertex in the shape.
load the image and then get the texture coordinates from your shape vertices. if you have the shape as a vector of points it would look something like:
thanks for the quick and helpful replies! i haven’t had a chance to try your suggestions yet (work + midterms), but i plan on messing around more with it this weekend.
looking forward to making some cool stuff in openframeworks!