Results 1 to 2 of 2

Thread: Single mesh versus array of mesh

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2012
    Location
    United States
    Posts
    1

    Single mesh versus array of mesh

    Hello all,

    I plan on loading data from COLLADA files into OpenGL for rendering.
    Here is an incomplete (no ending tags) example of what we're looking at.

    <library_geometries>
    <geometry id="Box1-lib" name="Box1Mesh">
    <mesh>
    <geometry id="Box2-lib" name="Box2Mesh">
    <mesh>

    Notice how the two objects (Cubes) each have their own mesh.
    My question, is whether to combine both meshes into a single CMesh class,
    or have an array<CMesh> type of approach.
    In either case, Mesh is my complete format for feeding the info into OpenGL.

    There may be more overhead for a separate rendering of each mesh, but will combining the two together, then rendering have undesired effects?

  2. #2
    Newbie Frequent Contributor
    Join Date
    Mar 2016
    Posts
    896

    Re: Single mesh versus array of mesh

    If you want to draw them with a single draw call both meshes need to have the same "material" (i.e. textures, shaders, uniforms, etc.) and vertex format (e.g. same number of texture coordinates).

Similar Threads

  1. Interpolating between mesh keyframes causes mesh to break
    By soulfoam in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 01-19-2019, 10:34 PM
  2. Replies: 2
    Last Post: 05-04-2005, 07:28 PM
  3. Self shadowing for a single polygonal mesh
    By maximian in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 12-26-2003, 12:14 PM
  4. single or multiple vertex arrays per mesh?
    By imported_titan in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 01-20-2003, 01:02 PM
  5. Timings while rendering a single big mesh
    By Funes in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 09-11-2002, 03:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean