How smart is Blitz with rendering?

Blitz3D Forums/Blitz3D Programming/How smart is Blitz with rendering?

Jeroen(Posted 2003) [#1]
 If m\border <> 0 And EntityInView (m\border,p\camera) ShowEntity m\border


Does this increase peformance? ...Or does Blitz handle this internally and does this extra line actually slow it down?

Thanks


Ross C(Posted 2003) [#2]
Hey, check out this thread. It has some code done by myself, that lets you see what the speed gains are like :)


Jeroen(Posted 2003) [#3]
euh, which thread? :D


Litobyte(Posted 2003) [#4]
Eheheh he forgot to add the link! :P

BTW, no that is not increasing the performances, because the engine already hides and don't render objects out of camera view.

Cheers


Ross C(Posted 2003) [#5]
Hehehe, sorry.

http://www.blitzbasic.com/Community/posts.php?topic=26335

Hiding object will increase performance, as it disables the collisions too. Try the code and see. There's one near the bottom that uses entity alpha as well.


Jeroen(Posted 2003) [#6]
thanks!


Genexi2(Posted 2003) [#7]
> as it disables the collisions too.

Which can cause big issue's.....in most cases for movable objects....which EntityAlpha is the answer for, but as already said, Blitz automatically doesnt draw offscreen crap, so it'll just slow it down by tellin it to do something it already did...


John Blackledge(Posted 2003) [#8]
I do the hide/show objects thing:
e.g....
for z =1 to maxobjects
if object(z) is NOT in view then HideEntity object(z)
if object(z) IS in view then ShowEntity object(z)
next
.... and gained at least 5 fps.


Jeroen(Posted 2003) [#9]
Aaaah thanks for the answers.
I will use it for "static" entities (entities that form the scenery).