Results 1 to 5 of 5

Thread: Shaded vs Wire Frame Mode

  1. #1
    Guest

    Shaded vs Wire Frame Mode

    I use the glusphere to generate my model. When I use the shaded mode, my animation is fast. When I switch to wireframe mode, it slows down considerably. Why is this? When I draw planes using GL_QUADS, the reverse is true which to me is more logical.

    Can anyone shed any light on this and perhaps suggest a solution so that the wire frame mode animation runs quicker

    Many thanks

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2002
    Location
    Poland
    Posts
    196

    Re: Shaded vs Wire Frame Mode

    I'm not sure but it might be that wire mode is not hardware accelarated. Else with no wire frame it depends on fill rate which is supported by any hadrware.

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: Shaded vs Wire Frame Mode

    A lot of hardware emulate line drawing by drawing two triangles for every line. This sort of makes sense since OpenGL requires things like sub pixel precision and texturing for lines, so it takes a little work to do proper line drawing hardware.

    Anyway, this all means that you can easily become transform bound when using wireframe mode, especially if you use glPolygonMode to set it and don't draw the edges yourself as GL_LINEs. PolygonMode really forces the card to draw each edge twice. You probably see less of a slowdown with quads simply because they give you less edges overall in the mesh.

  4. #4
    Guest

    Re: Shaded vs Wire Frame Mode

    Thank you. I do not suppose there is a command which will prevent OPENGL from drawing repeat lines?

  5. #5
    Senior Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: Shaded vs Wire Frame Mode

    Nope. It's inherent in the way glPolygonMode works. OpenGL has no connectivity information so all it can do is reder each triangle as three lines. This means that shared edges will be drawn twice. If you want it to go faster, draw the edges yourself with GL_LINEs.

Similar Threads

  1. wire frame
    By mikeg in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-20-2004, 07:44 PM
  2. Wire Frame Rendering
    By in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 01-17-2004, 07:59 AM
  3. Wire Frame Rendering
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-27-2003, 11:03 AM
  4. Wire-Frame Mode
    By Stack Overflow in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-18-2002, 01:54 PM
  5. textures on a wire frame
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-25-2001, 10:43 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