OnPreRender seems wrong

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
lynggng
Posts: 3
Joined: Mon Sep 13, 2004 1:22 am

OnPreRender seems wrong

Post by lynggng »

OnPreRender would call registerNodeForRendering to register nodes to the corresponding list for later use. in turn, isCulled is called to try to cull away that node. the camera's tranformation is needed in the isCulled, but, quite possibly, the camera HAS NOT been updated when it is used, this is buggy!
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

That's right. Another problem is the OnPreRender()- OnPostRender() stuff. I don't like it anymore, one of the methods is definately too much. Will be changed in one of the next releases.
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

rats, my portal rendering system http://www.irrlichtnx.mmdevel.de/phpBB2 ... .php?t=142 (which I still haven't got around to giving a thorough speed test btw) depends on having both those functions, as OnPreRender is never called for nodes culled by the portal rendering.Oh well, I suppose I'd just have to add a new variable or something so I node would know whether or not it should be culled, while always updating its position.

Also, while we're on the topic of OnPostRender, that function needs some modifying so each node does not have to recompute its rotation matrix and do a matrix-matrix multiply every frame, only if its transformation was actually changed in the last frame
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
Post Reply