Jump to content
  • Advertisement

infinitbelt

Member
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

100 Neutral

About infinitbelt

  • Rank
    Newbie
  1. Hi, Does anybody have any suggestions on how to create an airplane model in OpenGL (or have an example of a simple one)? I need to make the plane circle around but I just can't seem to create the plane model. I have tried gluCylinder, but couldn't get that to work. Thanks!
  2. Hi, I need to create a model of a car and I am having trouble creating the wheels for it. The wheel has to be formed from 8 triangles rotated in a circle about a point. However, I am having difficulty with that. Here's what I have so far: void draw_triangle () { glBegin(GL_TRIANGLES); glColor3f(0.0, 0.0, 1.0); glVertex3f( 0.0, 0.0, 10); glColor3f(1.0, 0.0, 0.0); glVertex3f(0.0, 0, -10); glColor3f(0.0, 1.0, 0.0); glVertex3f( 0.0, -10, 0); glEnd(); } void draw_wheel () { glMatrixMode(GL_MODELVIEW); glPushMatrix(); glTranslatef(0.0, 10.0, 0.0); draw_triangle(); glRotatef(45, 1.0, 0.0, 0.0); draw_triangle(); glPopMatrix(); } However, it is not giving me the desired result. I know that I am only drawing 2 triangles instead of 8, but it did not give me a desired result with 2 so I figured I would hold off on drawing all 8. If I can draw just one wheel correctly, I think I can manage drawing four wheels and placing them in the right locations but I just cannot seem to get it. Any help is appreciated. Thank you! [Edited by - infinitbelt on February 7, 2010 12:45:02 AM]
  3. Hi, I have an object defined in world coordinates, say a circle centered at (2,3) with radius 4. If I want the circle to not be distorted, to be entirely visible in the viewport and to be as big as possible within the viewport, how can I formulate a gluOrtho2D command to create a world window based on the aforementioned specs given that: glViewport(20, 30, 1000, 500)? I am getting confused with the whole viewport vs world vs screen, etc coordinates. Can someone walk me through it? I really want to get the hang of this. Thanks!
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!