
Both Wire & solid
Hello,
How to draw a wire and solid box ?
Without light a solid object is a big polygon, but if he''s wired (both solid) we can see the edges. How to do that ?
I try to render solid then wire, but it''s ugly, there is some clippings bug (zbuffer) and is realy slow. Maybe i must remove hidden lines and hidden face, but i dont know how to do that too...
thanks a lot

Don''t know if this is how you are doing it but this should work:
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
... now draw polygons (filled in polygons)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
... now draw polygons (just lines / may have to change polygon color to show up / there may be a line function that does this?)
Luigi Pino
The 23rd Dimension
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
... now draw polygons (filled in polygons)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
... now draw polygons (just lines / may have to change polygon color to show up / there may be a line function that does this?)
Luigi Pino
The 23rd Dimension
You might also want to move your camera forward over a very small distance (as small as possible). Otherwise your wire-frame might be partially hidden behind the full polygons (I believe people call this "z-fighting", because it''s caused by rounding errors in the z-buffer)
quote:
Original post by Koen
You might also want to move your camera forward over a very small distance (as small as possible).
Look up glPolygonOffset for that, it''s a more elegant solution.

a simpler solution is to set the depth testing mode to GL_LEQUAL instead of GL_LESS... but that may not always work, as the depth values generated may differ slightly depending on the rendering mode...
Another method to consider instead of glPolygonOffset, which can have some very weird issues sometimes, is to simply push the near and far clip planes out by the distance you want to offset...
| - Project-X - my mega project.. big things comming soon - | - adDeath - an ad blocker I made - | - email me - |
[edited by - RipTorn on November 26, 2002 12:13:41 AM]
Another method to consider instead of glPolygonOffset, which can have some very weird issues sometimes, is to simply push the near and far clip planes out by the distance you want to offset...
| - Project-X - my mega project.. big things comming soon - | - adDeath - an ad blocker I made - | - email me - |
[edited by - RipTorn on November 26, 2002 12:13:41 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement