PDA

View Full Version : Draw an arrow (or line) representing a direction.



Onumis
09-23-2011, 07:05 AM
Hello!

As the subject states, I would like to render an arrow or a simple line that allows me to visually see a direction (vector).

For example, to render the incoming light direction, view direction, or surface normals.

If this can be done on GLSL that would be awesome!

Thx

Onumis
09-28-2011, 07:51 AM
bump.

_arts_
09-28-2011, 09:53 AM
glBegin (GL_LINES);
glVertex3fv (pos);
glVertex3f (pos.x+dir.x, pos.y+dir.y, pos.z+dir.z);
glEnd()