drawing or displaying vertex normal
hi all
am new to this forum, am in desperate need of c or c++ code snippet to display or draw vertex normal with mesh. can u guys pls help me...
thanks in advance
shru
am new to this forum, am in desperate need of c or c++ code snippet to display or draw vertex normal with mesh. can u guys pls help me...
thanks in advance
shru
Code:
glBegin(GL_LINES);
glVertex3f(vertex_x, vertex_y, vertex_z);
glVertex3f(vertex_x + normal_x, vertex_y + normal_y, vertex_z + normal_z);
glEnd();
Note that depending on your coordinate system, you may want to multiply the normal values by a constant so they aren't way too big, or way too small.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Normal Mapping Precision on iOS | OptimisticMonkey | 6 | 7,395 |
Apr 13, 2011 11:35 PM Last Post: OptimisticMonkey |
|
| Another beginner's question about displaying an animated object | superlemonster | 2 | 4,061 |
Jan 28, 2011 08:03 AM Last Post: OptimisticMonkey |
|
| Getting the Normal for a polygon. | Jaden | 3 | 4,677 |
May 1, 2009 01:47 PM Last Post: Nosredna |
|
| Simple OpenGL 2d test - nothing displaying | SaxMan | 8 | 5,403 |
Jan 19, 2009 12:04 AM Last Post: TythosEternal |
|
| Vector (Normal) Map blending operations? | kelvin | 10 | 5,901 |
Mar 16, 2007 04:31 PM Last Post: OneSadCookie |
|

