About Store Forum Documentation Contact



Post Reply 
if(frustum(mesh->box()))
Author Message
Fluxor Offline
Member

Post: #1
if(frustum(mesh->box()))
In a lot of older code examples I often see a lot of
Code:
if(frustum(mesh->box())
or
Code:
if(frustum(someobject)


a) is this still necessary? Or do we have automatic frustum culling now?
b) if so, mesh->box() doesn't work anymore, what is the new syntax for this?

Thanks.
(This post was last modified: 09-06-2021 12:49 AM by Fluxor.)
09-06-2021 12:48 AM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #2
RE: if(frustum(mesh->box()))
Code:
if(frustum

if it is an object that extends a game object, it probably is not calling the parents rendering function through super, or it wants to draw something extra which requires another cull check unless you copy the parent rendering code so you only have to do it once, or it is rendered manually elsewhere.

I suggest looking at the source code for game objects if you are curious,
Engine->Game->Objects, you can look at Character or Item which I know specifically calls it differently.
(This post was last modified: 09-06-2021 02:16 AM by Zervox.)
09-06-2021 02:09 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: if(frustum(mesh->box()))
A) yes, necessary
B) Frustum(mesh->ext,
Or perhaps can just do Frustum(*mesh,

And yes as Zervox says, characters have it differently because they are animated by bones.

What tutorials have this problem? I can fix.
09-06-2021 02:27 AM
Find all posts by this user Quote this message in a reply
Fluxor Offline
Member

Post: #4
RE: if(frustum(mesh->box()))
Thanks guys, that's good to know.

Oh, I've seen that not in the tutorials, but mostly in older code that
is floating around here in the forums.
09-06-2021 01:09 PM
Find all posts by this user Quote this message in a reply
Post Reply