how to make lines glow?

I have this code that basically just fills in a single triangle of my mesh when the mouse hovers over it, but it’s kinda ugly. How can I make the edges of this triangle glow in and out instead of this ugly white fill.

I’m thinking I change GL.GL_FILL to GL.GL_LINE, but then, how do I get the lines to have a thick glowing effect?


gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
gl.glColor3f(1.0f, 1.0f, 1.0f);

// ...

gl.glVertexPointer(3, GL.GL_FLOAT, 0, elementsBuffer[idx]);
gl.glDrawElements(GL.GL_TRIANGLES, 3, GL.GL_UNSIGNED_INT, indicesBuffer[idx]);

Your right about the GL.GL_LINE, the changing of line thickness is:

GL.glLineWidth(2.0f);

1.0 is the default…

DP

Yeah, I got that, but I was wondering how or where to look up doing some neat effects, in this case, making the lines “glow”.

If you’re after a glow as a ‘neat effect’ then the standard article on the subject is here: http://www.gamasutra.com/features/20040526/james_01.shtml

Possibly slight overkill, it depends what you’re after.

I use a simple varying alpha value to create an effect of glow, well more of a dematerialise/rematerialise effect… but I think it does the job of highlighting quite well.

Peter