Fluxor
Member
|
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 |
|
Zervox
Member
|
RE: if(frustum(mesh->box()))
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 |
|
Esenthel
Administrator
|
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 |
|
Fluxor
Member
|
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 |
|