Draw a line from point a to b to c to d to a

Started by
17 comments, last by godkane 21 years, 10 months ago
Mmmm.. I didn''t now that Pol mode slowed down your rendering speed..

I made a simple game where I had a few wireframed cubes and I used this command.. I shall go and change it :D
Advertisement
If you have good drivers then that''s not really critical, but still slower.
The glPolygonMode command is very handy for debugging, but may not be used for "final" engines.
thx!!!

nuke
--------------------------Nukemmsn: nukem996@hotmail.comaim: nukem996open source open mind
quote:Original post by vincoof
I''m sorry but I have to disagree.
This may work, but has two major disadvantages :
1- it slows own a lot the rendering. Depending on your graphics card it may even switch to software rendering !
2- it doesn''t necessarily give you the rendering you want. For instance if one polygon is drawn half inside the viewing frustum and half outside, then the splitten triangles may appear.

In fact, you would have to play with the glEdgaFlag command which is bad known from general programmers.


1. Drawing in wireframe is probably for debugging purposes, so the speed isn''t that important. And if it''s not for debugging (e.g. a 3d modeler, where you can see the top,front,side view in wireframe) most likely speed isn''t that important. Nobody is gona play quake3 in wireframe mode !
2. I haven''t noticed that, when I tried it out, it worked fine for me.

glPolygonMode is by far the simpelest solution.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
1. that's right that 90% wireframe is used for applications that do not require extreme preformance, but still it's important to keep in mind the speed for critical cases in the other 10%.

2. you may experience that if your polygon has to be splitten because it is partially out of the viewing frustum. Also that may not happen if your drivers are "good enough". ANYWAY it will happen if you split concave polygons using GLU.

[edited by - vincoof on June 13, 2002 4:42:40 AM]
Vincoof you say it''s slower, however in theory it should be faster because the poly only has to be textured on the edges, it doesn''t have to be filled so the amount of pixels which need to be calculated is far less compared to a filled triangle.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
Vincoof you say it''s slower, however in theory it should be faster because the poly only has to be textured on the edges, it doesn''t have to be filled so the amount of pixels which need to be calculated is far less compared to a filled triangle.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
Yes in therory *giggles*
I''m sorry to be ironic, but in practice 90% of the drivers are at best as fast in wireframe than in solid mode. I know it''s not logical, but that''s the facts, and going a bit further it is logical.

Anyway it is necessarily slower (and that is really logical IMO) to do glPolygonMode(GL_LINE) with GL_TRIANGLES than using GL_LINES.
I just the other day was messing with wireframe and solid and they were giving me around the same frame rate. I made wireframe myself using lines and it made a huge difference.

-godkane

This topic is closed to new replies.

Advertisement