Hello!
I´ve written a program which reads STL-Data to show it with OpenGL on the screen.
An STL-File consists of many triangles WITHOUT ANY ORDER! Each of this triangles has one normal vector and three vertices.
The program shows the object now correctly, but…
My problem is: I want to make a Smooth-Shading. This means that I need to know the normal vector of EVERY vertex. But I have only one per Facet.
I tried it with the medium of all vectors of the neigbours of each facet. But in this case the progam needs many time to order the facets.
My cuestion is:
1.) Is there any solucion for Flat-Shading without using normal vectors for every Vertex??
2.) Is there any data structure which is recomended for OpenGL?? (I´m using a list of the facets… very simple)… or much better: Is there any data structure PROVIDED BY OpenGL??
Thanks for helping me…
Greetings from Germany
BigRed