Jump to content
  • Advertisement
Sign in to follow this  
giugio

OpenGL mesh

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!