jPCT - a 3d engine for Java > Bugs

Changing Near plane leads to weird "reproject" results

<< < (5/5)

If anything, I would have expected it to be the other way round. If you omit the renderScene()-call, the draw()-call actually triggers some additional calculations that had to be done per frame but are usually done in renderScene(). These calculations were done too early to take a modified plane into account. However, I'm not sure why this should explain the behaviour that you are describing.
Anyway, I've updated the beta-jar of jPCT-AE. Please give it a try and see if that helps. If it doesn't (or makes things worse), can you please provide me with a test case?

Ok I'll give it a try tonight, thanks a lot Helge.

So what you're saying is that I should move the renderScene calls out of the "if" block ? Like this :

--- Code: --- if(displayNeedsUpdate) {
displayNeedsUpdate = false;




--- End code ---

Not necessarily. But from your description, it worked when you omit them but not if you are actually calling them...which puzzles me. Anyway, please give the modified jar a try and see if that helps. If not, try to move them out of this block and see if that helps. If that doesn't help either, I need a test case.

The new beta jar did not change anything, that said I have found the solution.
Actually I use a skybox, and I was calling the skybox.render() method after world.renderScene().
After switching this call order, everything works fine.

Thanks again and sorry for bothering you, cheers !

No problem. The order in the draw()-method was wrong anyway. Even if it wasn't a problem in your case, it's better to have it fixed.


[0] Message Index

[*] Previous page

Go to full version