Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7044573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:25:33+00:00 2026-05-28T02:25:33+00:00

Ok so im seperating my problem up because i need a depthy answer cos

  • 0

Ok so im seperating my problem up because i need a depthy answer cos im nooby with it and will fail if i have just a generalisation answer.

I have a car body which i originally drew using line_loop and have changed it to polygon so i can texture it. however it ignores the wheel arches like so.

car wrong

(ignore the texturing for now, i need to figure that one out another time 😉 )

This is what my car looks like with line_loop

car shape

If the way to make the wheel arches with polygon makes it a smoother circle then even better 🙂

This is my current code, (ignore the texture stuff) I did start tessellation with a prod in that direction from an earlier question but not sure exactly how to use it and which coords to pass etc etc. Thanks for all your help!!

void drawBody(int textureindex)
{
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, textureLib[textureindex]);

GLUtesselator *tess = gluNewTess(); // create a tessellator
      if(!tess) return 0;  // failed to create tessellation object, return 0

glBegin(GL_POLYGON);

glTexCoord2f(0.0F, 0.0F);
      glVertex2f(-1.0f, 0.0f);
glTexCoord2f(-0.97, 0.0);
      glVertex2f(-1.97f, 0.0f);
//wheel arch begin.
glTexCoord2f(-0.93, 0.3);
      glVertex2f(-1.93f, 0.3f);
glTexCoord2f(-0.95, 0.4);
glVertex2f(-1.95f, 0.4f);
glTexCoord2f(-1.2, 0.6);
glVertex2f(-2.2f, 0.6f);
glTexCoord2f(-1.6, 0.6);
glVertex2f(-2.6f, 0.6f);
glTexCoord2f(-1.82, 0.4);
glVertex2f(-2.82f, 0.4f);
glTexCoord2f(-1.8, 0.3);
glVertex2f(-2.8f, 0.3f);
glTexCoord2f(-1.78, 0.0);
glVertex2f(-2.78f, 0.0f);
//end wheel arch.
//Front of car.
glTexCoord2f(0.0, 0.0);
glVertex2f(-3.8f, 0.0f);
glTexCoord2f(0.0, 0.2);
glVertex2f(-3.7f, 0.2f);
glTexCoord2f(0.0, 0.4);
glVertex2f(-3.8f, 0.4f);
glTexCoord2f(0.0, 0.7);
glVertex2f(-2.8f, 0.7f);
glTexCoord2f(0.0, 0.7);
glVertex2f(-2.4f, 0.7f);
//Windscreen.
glTexCoord2f(0.0, 1.0);
glVertex2f(-1.0f, 1.0f);
glTexCoord2f(1.0, 1.0);
glVertex2f(0.5f, 1.05f);
glTexCoord2f(1.0, 0.8);
glVertex2f(2.3f, 0.8f);
//rear bumper.
glTexCoord2f(1.0, 0.5);
glVertex2f(2.15f, 0.5f);
glTexCoord2f(1.0, 0.3);
glVertex2f(2.15f, 0.3f);
glTexCoord2f(1.0, 0.3);
glVertex2f(2.35f, 0.3f);
glTexCoord2f(1.0, 0.0);
glVertex2f(2.0f, 0.0f);
glTexCoord2f(1.0, 0.0);
glVertex2f(1.83f, 0.0f);
//wheel arch begin.
glTexCoord2f(1.0, 0.3);
      glVertex2f(1.85f, 0.3f);
glTexCoord2f(1.0, 0.4);
      glVertex2f(1.86f, 0.4f);
glTexCoord2f(1.0, 0.6);
glVertex2f(1.6f, 0.6f);
glTexCoord2f(1.0, 0.6);
glVertex2f(1.2f, 0.6f);
glTexCoord2f(1.0, 0.4);
glVertex2f(1.0f, 0.4f);
glTexCoord2f(1.0, 0.3);
glVertex2f(1.0f, 0.3f);
glTexCoord2f(1.0, 0.0);
glVertex2f(1.05f, 0.0f);
//end wheel arch.
glEnd();
glDisable(GL_TEXTURE_2D);
}

Revised code for tessellation, (only attempted on one wheel arch so far and has had no affect).

    GLdouble car[7][2] = { {-1.93,0.3}, {-1.95,0.4}, {-2.2,0.6}, {-2.6,0.6}, {-2.82,0.4}, {-2.8,0.3}, {-2.78,0.0} };
    GLUtesselator *tess = gluNewTess(); // create a tessellator
gluTessBeginPolygon(tess, 0);  
gluTessBeginContour(tess);
{
    gluTessVertex(tess, car[0], car[0]);
    gluTessVertex(tess, car[1], car[1]);
    gluTessVertex(tess, car[2], car[2]);
    gluTessVertex(tess, car[3], car[3]);
    gluTessVertex(tess, car[4], car[4]);
    gluTessVertex(tess, car[5], car[5]);
    gluTessVertex(tess, car[6], car[6]);
}
gluTessEndContour(tess);
gluTessEndPolygon(tess);

Thanks for all your help, the final image looks like this:

car finished

Again thanks for all your help! Especially PeterT 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:25:33+00:00Added an answer on May 28, 2026 at 2:25 am

    You are not using the tessellator at all. Feeding the coordinates to the tessellator will look something like this

        gluTessBeginContour(tess);
            :
            gluTessVertex(tess, v[i], v[i]);
            :
        gluTessEndContour(tess);
    

    Read here and grab the examples http://www.songho.ca/opengl/gl_tessellation.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to format a number so that there is a comma seperating the
I have a div with 2 images side by side. Theres a space seperating
can any body help me on separating this example of data that i need
Note: I have a workaround to this problem, but I'd prefer to comma-separate the
I have a little problem. I have one 1 RichTextBox and 2 Buttons. I
I've just come across a rather odd problem whilst testing my applications webflows. I
i have the following string: http://pastebin.com/d29ae565b i need to separate each value and put
I have an encoding problem I can't seem to get to grips with regarding
I have a major problem. We have a asp.net application that has this report
I'm just wondering, what is the whole point of separating classes into an .h

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.