# Triangle Stripe (Texture, Normal)

This topic is 4878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello. I am confused over figuring out how I should assign the normals to vertices in my program (cloth). I am using triangle stripe to represent my mesh, I have a loop that draw all my stripes like this:
struct Stripes {

int number_of_nodes;
struct Node {
int no;
}nodes[100];

} Tri_Stripes [50];

glBegin(GL_TRIANGLE_STRIP);
for(int x=1;x<=number_of_stripes;x++){
for (int y = 0; y <= Tri_Stripes[x].number_of_nodes ; y++){

vec3 no = box_array[Box_N]->particles1[Tri_Stripes[x].nodes[y].no]->velo;
glNormal3f(no.getX (),no.getY (),no.getZ ());
glVertex3f(box_array[Box_N]->particles1[Tri_Stripes[x].nodes[y].no]->pos.getX (),		   box_array[Box_N]->particles1[Tri_Stripes[x].nodes[y].no]->pos.getY (),	           box_array[Box_N]->particles1[Tri_Stripes[x].nodes[y].no]->pos.getZ());
}//end for

}//end for loop
glEnd();


the program draw the mesh but to calculate my normal I take each vertices's velocity (direction) and then normalise it and assign it to my glNormal3f as above. The result isnt what I want and as I can see normals are not working. Once I solve this problem I will ask my problem about textures. Thanks in advance [Edited by - bargasteh on September 14, 2005 8:49:26 PM]

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634135
• Total Posts
3015752
×