Clipping
I know this is a stupid question, but I have to be sure.
What happens if I try to draw some off-screen triangles in OpenGL?
Does OpenGL clip them?
The real question is: Does it worth coding my own clipping function, or does OpenGL already does it for me?
November 23, 2000 02:07 AM
Code your own. OpenGL I think... eventually clips triangles in order to render them, but by then its too late to speed it up.
do NOT write your own clipping function it will be slower than what the card does in hardware. yes clipping is automatic
http://members.xoom.com/myBollux
http://members.xoom.com/myBollux
I''m quite puzzled...
Do I have to code my own clipping function or Not?
Will my code optimize something or will it slow down everything?
Do I have to code my own clipping function or Not?
Will my code optimize something or will it slow down everything?
sorry if i wasnt clear enuf. NO dont write one its done automatically for u by the cards gl driver in hardware.
http://members.xoom.com/myBollux
http://members.xoom.com/myBollux
further info from the nvidia performance faq
22. Should I perform any clipping myself?
No, it’s fastest to allow OpenGL to handle it, since the GPU performs viewport clipping very
efficiently. In order to take advantage of this clipping, applications should pass in unclipped
geometry. Applications should continue to perform gross culling against the view frustum
before sending complex objects, and some intelligent scene occlusion culling, such as a BSP.
http://members.xoom.com/myBollux
22. Should I perform any clipping myself?
No, it’s fastest to allow OpenGL to handle it, since the GPU performs viewport clipping very
efficiently. In order to take advantage of this clipping, applications should pass in unclipped
geometry. Applications should continue to perform gross culling against the view frustum
before sending complex objects, and some intelligent scene occlusion culling, such as a BSP.
http://members.xoom.com/myBollux
Ok, thanx.
But is it true for every OpenGL accelerated card?
Coding my own BSP Tree is still recomended. I should learn something about them...
But is it true for every OpenGL accelerated card?
Coding my own BSP Tree is still recomended. I should learn something about them...
November 24, 2000 12:28 PM
I think it''s important to draw a distinction between "clipping" and "culling". Newbies (and I''m not suggesting anyone here is a newbie) often think they are the same thing.
"Culling" is very important and *should* be done if you have more than a few objects in your world. This involves determining which objects and/or polygons are completely outside of your viewing area and simply not sending them down the rendering pipeline. This is what BSP trees, OSP trees, etc. do for you. OpenGL does not cull anything for you.
"Clipping" is what happens when OGL goes to actually draw polygons and finds that part or all of them fall outside of your viewing area. If you are using OpenGL (or any other 3D library I imagine) it''s unlikely that you could achieve ANY speedups at all by trying to perform your own clipping.
So, *DO* culling where possible and *DON''T* worry about clipping.
Toom
"Culling" is very important and *should* be done if you have more than a few objects in your world. This involves determining which objects and/or polygons are completely outside of your viewing area and simply not sending them down the rendering pipeline. This is what BSP trees, OSP trees, etc. do for you. OpenGL does not cull anything for you.
"Clipping" is what happens when OGL goes to actually draw polygons and finds that part or all of them fall outside of your viewing area. If you are using OpenGL (or any other 3D library I imagine) it''s unlikely that you could achieve ANY speedups at all by trying to perform your own clipping.
So, *DO* culling where possible and *DON''T* worry about clipping.
Toom
how does a bsp tree work? dunno? read this...
here.(http://romka.demonews.com/graphics/doc/txt/bsptree.htm)
Edited by - GumpusPMaximus on November 24, 2000 4:23:56 PM
here.(http://romka.demonews.com/graphics/doc/txt/bsptree.htm)
Edited by - GumpusPMaximus on November 24, 2000 4:23:56 PM
~Gumpus P. Maximus~
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement