Texturing the outlines?

Started by Obsyd, May 07, 2012, 20:54:19

Previous topic - Next topic

Obsyd

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)

Simon Felix

Are you just saying you want to texture a slightly bigger triangle?
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/

Obsyd

Not really.
I need to somehow texture the outlines.
I can't make the triangle bigger.

Maybe I can specify a different rasterization method?

CodeBunny

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.

Obsyd

Thank you CodeBunny!
It works! :)

Is there a mode where I don't need to "double" render? (I guess no)

Again,
Thanks!