# Triangle Stripe (Texture, Normal)

This topic is 4807 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]

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 9
• 9
• 14
• 12
• 10
• ### Forum Statistics

• Total Topics
633270
• Total Posts
3011159
• ### Who's Online (See full list)

There are no registered users currently online

×