Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: What's faster : 1 quad or 2 triangles ???

  1. #1
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    What's faster : 1 quad or 2 triangles ???

    Hi !

    On geforce 2&3 boards, suppose I've got 4 vertices A, B, C, D, lying on the same plane. What's faster to render : the quad ABCD or the two triangles ABC and ACD ? And is the same true about quad strips and triangle strips ?

    Thanks in advance !
    Morglum

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,662

    Re: What's faster : 1 quad or 2 triangles ???

    it depends.

    anyway, if you do the same way for triangle and quad, quad would be better i think.

    but it exists strip and fan which are special ways to avoid redundant vertices.
    So drawing strip/fan triangles would be better than drawing simple quad... you can do strip for quad.
    Your quads must be convexe quads.
    Triangles are most used than quads (which grow up then).

    So, do strip with quad would be same way as doing strip with triangles.
    Care, too, of the number of vertices. If your quads models's got more vertices, it may be less powerful.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    Re: What's faster : 1 quad or 2 triangles ???

    Thanks jide ! I'm writing an ASE loader and all quads are converted into triangles in the ASE file. So I wondered whether it would be worth writing some code to detect when two tris are part of one convex quad, and then convert these two tris into one quad.

  4. #4
    Senior Member Regular Contributor
    Join Date
    May 2000
    Location
    Oxford, England
    Posts
    472

    Re: What's faster : 1 quad or 2 triangles ???

    also bear in mind that by treating all poly's as triangles you can draw all of them in one go (say vertex arrays) without having to deal with seperate polygon types which will save you a lot of time....

  5. #5
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    Re: What's faster : 1 quad or 2 triangles ???

    Yes, it's true, but I planned to split my original vertex array into strips and fans. So I would have many vertex arrays anyway. I hope to improve rendering speed by this, but I might be mistaken... what do you think ?

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,662

    Re: What's faster : 1 quad or 2 triangles ???

    from Rob The Bloke:
    also bear in mind that by treating all poly's as triangles you can draw all of them in one go (say vertex arrays) without having to deal with seperate polygon types which will save you a lot of time....

    i think sometime, quads must be converted into triangles. But you can do as well vertex arrays with triangles, or quads by using glDraw*(); The first parameter is the parameter you give generally to glBegin();

    As far, i got an Ase loader (i've taken it from an existed program), and i failed on loading all the objects. It only load the bigger object and the last (so i have strange things). I think it's due to that i didn't separate the different objects. That make me tired to think again about it. So, i may use another opened, free ASE loader (when i'll find it).

  7. #7
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    Re: What's faster : 1 quad or 2 triangles ???

    I can give you mine, if you don't find anything better, although it's not finished and it handles memory very unefficiently.

    Morglum

  8. #8
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: What's faster : 1 quad or 2 triangles ???

    Hi !

    I think most OpenGL implementation breaks down the quad to two triangles anyway in the end so you would not gain much from it compared to a two triangle strip for example.

    Compared to GL_TRIANGLES you would have two less vertices to send down the pipeline which might be worth the trouble.

    Mikael

  9. #9
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,662

    Re: What's faster : 1 quad or 2 triangles ???

    morglum,
    let's see, why not !

    mickael, that's may be possible. Most of graphic cards only do triangles that are most sure to draw than quads which maybe difficult to delimitate, and fill. Then, that's what i think !

  10. #10
    Senior Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    806

    Re: What's faster : 1 quad or 2 triangles ???

    I already pointed this out in another thread not so long ago, but I'll repeat it here: I would advise against using quads.

    Even if sending a quad is faster than sending two triangles (which I'll believe when I see it), you can get a similar effect by using triangle strips.

    By sticking with triangles, you also avoid a lot of potential problems down the road. You may encounter models with concave quads in them, for example, or you may get Z-fighting when doing multipass because the quad's triangulation changes for some reason.

    -- Tom

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 07-04-2013, 01:42 AM
  2. Artifacts while trying to draw a Quad with Triangles
    By allenmoatallen in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-25-2013, 10:06 PM
  3. 2 Triangles vs Quad?
    By Skute in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 01-31-2003, 12:49 PM
  4. Which is faster?
    By LostInTheWoods in forum OpenGL: Advanced Coding
    Replies: 20
    Last Post: 10-22-2002, 03:18 PM
  5. 1 QUAD or 2 TRIANGLES?
    By NOAH IV in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-31-2001, 08:26 AM

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