How smart is Blitz with rendering?
Blitz3D Forums/Blitz3D Programming/How smart is Blitz with rendering?
| ||
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 |
| ||
Hey, check out this thread. It has some code done by myself, that lets you see what the speed gains are like :) |
| ||
euh, which thread? :D |
| ||
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 |
| ||
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. |
| ||
thanks! |
| ||
> 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... |
| ||
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. |
| ||
Aaaah thanks for the answers. I will use it for "static" entities (entities that form the scenery). |