View Full Version : 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
08-12-2003, 02:31 AM
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.
08-12-2003, 04:31 AM
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.
Thank you. I do not suppose there is a command which will prevent OPENGL from drawing repeat lines?
08-12-2003, 03:18 PM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.