🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Why BSPs ?

Started by
5 comments, last by NeoGL 23 years, 11 months ago
Just wondering that when you write a game engine in OpenGL and enable depth cueing and back face culling, then why bother with writing BSP trees and z buffer algorithms. OpenGL is supposed to be doing it for us, right ? or what am I missing ? Thanks
Advertisement
I think you''ll find that even with opengl doing depth cueing and back face culling that you will still be drawing all of your geometric data. Using a BSP tree is one way of limiting the data drawn to that which is needed for the viewer to see a complete scene.
Yea, If you still send all your data to opengl, then opengl still has to test every point/pixel(depending on technique). If you use a BSP tree or other form of space partitioning you don''t need to send all your data to opengl.

ECKILLER
ECKILLER
OTOH; OpenGL could potentially do this a _lot_ faster, no? I don''t know wether this kind of thing is done in hardware on newer cards, but if it isn''t it damn well should be.
BTW; how do you enable depth queing?
BSP''s main use is that you can set the DepthFunc to GL_ALWAYS, and so although the pixel values do get written to the z-buffer, they are not tested - even in hardware this is faster.

Another advantage is that if they are in the correct order to start with, then if you have blended polys then it will always draw correctly.

Remember, API''s like GL are NOT an alternative to writing a fast 3d engine (although D3D makes it seem like that).



========
Smidge
www.smidge-tech.co.uk
========
--Mr Smidge
Another thing is that u''d have to check the whole map every frame or something like that...
so, if u can precompile this (when u r compiling the map) u don''t have to do that again and again at runtime..

that''s just my opinion.

cya,

Phil
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )

This topic is closed to new replies.

Advertisement