# OpenGL mesh

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

## Recommended Posts

Hy. What are mesh? I still reading Beginning OpenGL Game Programming but they are not explained. Thanks.

##### Share on other sites
A "mesh" in this context is normally used to describe a 3D model. A 3D model can be referred to as a mesh, as it is a mesh of polygons(triangles) which come together to create the model.

##### Share on other sites
thanks.
But what do this meshes?
you have a link or there is a book that explain this?

up

##### Share on other sites
You want to know what a mesh does? A mesh is just polygons that make up an object. Download some 3D games and try them out like Quake 3, etc. All the models, buildings, weapons, powerups are meshes.

Also, you need to ask this type of questions in the General forum.
Here, you can ask OpenGL programming related questions.

##### Share on other sites
Meshes combine a topology with geometry. Typical elements of the topology are vertices (0-dimensional elements), edges (1-dimensional elements), and faces (2-dimensional elements). Those are all primary class elements. The boundary of faces as well as holes in faces are defined by loops, i.e. closed strings of edges. Loops are secondary class elements and often not explicitely modelled.

Even seldom known second class elements are shells which are concatenated faces, similarly to loops that are concatenated edges. Closed shells form the boundary of a region, the 3-dimensional first class element. A region is a solid space, similar to a face which is a solid area. The 3-dimensional companion piece of a hole is the voidance, i.e. an empty space in a region.

As can be seen, the topology defines _how_ a structure is build. It doesn't define the actual form of the structure in space. This is the job of the geometry. In a mesh, the geometry is associated with the vertices. For this purpose a vertex has a position and a normal. Notice please that due to the above explanation, a vertex by itself is more than its position!

Most often "mesh" is used as a synonyme for a single region (inclusive its geometry) where each edge is used by exactly 2 faces.

Now, in OpenGL, vertices are known, edges are known, and faces are known. Vertices are used directly; edges as instances are often ignored, but they are used indirectly when a series of vertices (e.g. the "corners" of a face) is specified. Faces are ever specified indirectyl only, by the aforementioned series of "corner" vertices. Shells are dealt with also indirectly only, e.g. by reusing vertices for several faces and hence building closed looking face structures. Regions and voidances are also left totally to the designer.

• ### What is your GameDev Story?

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

• 27
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634100
• Total Posts
3015527
×