Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: extrusion

Hybrid View

  1. #1
    Junior Member Regular Contributor
    Join Date
    Apr 2010
    Posts
    111

    extrusion

    hello.
    I have some 2d shapes that I would like to extrude for a depth, and the result must be a 3d solid.
    The 2d shape is a bidimensional set of 2d vertexes.
    How i can create the 3d vertexes , the triangles and indexes of the triangles ?
    I would use only opengl and c++ math code nor glut or glew ecc....
    Thanks.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2004
    Posts
    248
    Extrusion is the easy part obviously. But OpenGL does not help you filling in the front face. Although GLUT offers some functions to tesselate, you will need to do that on your own.

  3. #3
    Junior Member Newbie
    Join Date
    May 2012
    Posts
    17
    Quote Originally Posted by giuseppe500 View Post
    hello.
    I have some 2d shapes that I would like to extrude for a depth, and the result must be a 3d solid.
    The 2d shape is a bidimensional set of 2d vertexes.
    How i can create the 3d vertexes , the triangles and indexes of the triangles ?
    I would use only opengl and c++ math code nor glut or glew ecc....
    Thanks.
    It's very easy. Just make a copy of the 2D shape and connect the edges between them. Every edge pair will form a quad, or two triangles if you want.
    You don't need OpenGL to do this either.

  4. #4
    Member Regular Contributor
    Join Date
    Jun 2013
    Posts
    495
    There's also the GLE Tubing and Extrusion Library, which supports extrusion along arbitrary paths.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •