Hello!
So my problem is that I would like to texture a triangle but the texture only appears inside the wireframe of the triangle. I also need to texture the wires(the outline of the triangle) that represent the triangle.
How can I do that?
Thank you!
The pink area is the picture that I get if I render the "green" triangle. (basically its the inside of the green wire)
Are you just saying you want to texture a slightly bigger triangle?
Not really.
I need to somehow texture the outlines.
I can't make the triangle bigger.
Maybe I can specify a different rasterization method?
These calls set rendering to be wireframe or fill mode:
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
If you want to render both the polygon, and render the wireframe differently, I'd suggest rendering them both in a two-pass scenario.
Thank you CodeBunny!
It works! :)
Is there a mode where I don't need to "double" render? (I guess no)
Again,
Thanks!