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 8 of 8

Thread: Quads

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2003
    Location
    England
    Posts
    3

    Quads

    Hello all you gl gurus out there. I am a beginner to OpenGl and I need some help.
    I need to use quads to render a model. However, when I render this model, the quads appear incomplete. I can rectify this by using quadstrips, but I need to use quads for my smooth shading. I have tried using glEdgeFlag but to no avail. Does anyone know how rectify this.

    For a screenshot of the problem go to:
    http://www34.brinkster.com/acdudesstuff/untitled.jpg

    I hope someone can help

    Thanks in anticipation

    Alc
    I'm going to Never Never land with me chosen family!

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    601

    Re: Quads

    The link to your screenshot gives the following:

    HTTP1.1 STATUS 403 Remote Access to this object forbidden This file cannot be directly accessed from a remote site, but must be linked through the Brinkster Member's site.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Apr 2002
    Location
    kremnica, slovakia, europe, earth, sol :-)
    Posts
    102

    Re: Quads

    alhough i can not see any image i've got an idea... are your quads planar and convex??

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2003
    Location
    England
    Posts
    3

    Re: Quads

    If you get that link error, copy the link into the browser bar at the top. That should work. For some reason you cant directly hyperlink there. (It doesn't hyperlink on my machine).

    I am not sure. The dataset is indescrete so I think that the quads a convex. Any ideas????
    I'm going to Never Never land with me chosen family!

  5. #5
    Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    296

    Re: Quads

    You need to understand how strips work. In the case of a quad strip, you start with two vertices and after that, every two vertices will make a quad.


    You might need something like:

    // First quad
    curr_quad->vertex[0]
    curr_quad->vertex[1]
    curr_quad->vertex[2]
    curr_quad->vertex[3]

    // Second quad
    curr_quad->vertex[3]
    curr_quad->vertex[2]
    curr_quad->vertex[4]
    curr_quad->vertex[5]

    // Third quad
    curr_quad->vertex[5]
    curr_quad->vertex[4]
    curr_quad->vertex[6]
    curr_quad->vertex[7]

    You get the idea.

  6. #6
    Junior Member Newbie
    Join Date
    Mar 2003
    Location
    England
    Posts
    3

    Re: Quads

    This is just it! I understand how quadstrips work, but when I pass a 4 independent vertices to gl_quad as opposed to a 2 vertices to a quadstrip for each quad I want attached to the previous, I get the image the URL above points to.

    I am providing complete information (4 vertices) for convex simple quads but just seem to get some sort of triangle fan pattern instead. I am not entirely sure why!

    REgards

    Alc
    I'm going to Never Never land with me chosen family!

  7. #7
    Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    296

    Re: Quads

    I did not mean to insult you... Sorry about that.

    Send me the code. I am pretty sure it is the winding you are having problems with. Did you try the order of the vertices as I showed above?

    mancha_c@hotmail.com

    Miguel Castillo

    [This message has been edited by mancha (edited 03-02-2003).]

  8. #8
    Junior Member Newbie
    Join Date
    Mar 2003
    Location
    England
    Posts
    3

    Re: Quads

    Its ok, I was not insulted, my post before sounded as though I was! My mistake No harm done i'm sure!

    The code I am using is in a massive 200000 + polygon loop! Will take some time to adjust them for this.

    Will keep ya posted

    Alc
    I'm going to Never Never land with me chosen family!

Posting Permissions

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