ViewPort Switchover IllegalStateException

@phr00t said:
I can understand this concern, it is very valid. However, we'd all be better served if these concerns were shared with the community without the combative attitude.

*sigh* Here we go with the twisting game again.. What you describe is exactly what I did, I explained why one should not replace the default viewport rootnode like you do. From the beginning I questioned and asked about the ViewPort approach, you kept it and did not explain why that is important to you which is the only question I ever asked. You only comment on that was "its the same result". Your inability to accept that some of your statements are wrong and need correction are exemplified in other threads. I also don't know why you need to vote me down with two accounts, this is the kind of attitude that fuels the pointless discussion, not me asking questions or correcting you.
What you describe is exactly what I did, I explained why one should not replace the default viewport rootnode like you do.


Yes, which is a good thing to explain. However, you added the unnecessary combative attitude with the "bollocks" line, which is the only line I have complained about thus far.

you kept it and did not explain why that is important to you


I did, multiple times:

At any rate, I have many things attached to SimpleApplication.rootNode.

but that [e.g. doing it my way] is easier than organizing all of my objects sitting directly on the built-in rootNode

Chalk it up to poor planning, but my built-in rootNode gets filled with lots of stuff that I don’t want rendered while viewing the map. Instead of detaching all of those things, then re-attaching them when leaving the map, I can just detach that whole scene and attach my map scene (and vice versa).


---

You only comment on that was “its the same result”


This was only in response to zarch's nice suggestion, and I meant it as the results looking the same (even though his may work better/different under-the-hood). I've already clarified this once.

Your inability to accept that some of your statements are wrong and need correction are exemplified in other threads.


I believe some of the problem lies in you holding a grudge against me from other threads that ended up like this one. It is a shame -- I'd love to just post a question, get advice, and move on. However, all to often, you come looking for a fight where there doesn't need to be one.

I also don’t know why you need to vote me down with two accounts


This is a baseless accusation. I am not voting you down with multiple accounts. I don't find it hard to believe that other people within the jME3 community do not like your combative attitude either (or these silly resulting threads where I stand up for myself, hoping we can both continue future discussions in peace).
@phr00t said:
At any rate, I have many things attached to SimpleApplication.rootNode.
but that [e.g. doing it my way] is easier than organizing all of my objects sitting directly on the built-in rootNode
Chalk it up to poor planning, but my built-in rootNode gets filled with lots of stuff that I don’t want rendered while viewing the map. Instead of detaching all of those things, then re-attaching them when leaving the map, I can just detach that whole scene and attach my map scene (and vice versa).

:? All this doesn't explain why it cannot be another node you attach to but has to be the rootNode.

@phr00t said:
I believe some of the problem lies in you holding a grudge against me from other threads that ended up like this one. It is a shame -- I'd love to just post a question, get advice, and move on. However, all to often, you come looking for a fight where there doesn't need to be one.

I think the downvote example shows very good who holds a grudge here. If its both you or just one doesn't matter, I am sure the guy that always downvotes together with you will help you out in accusing me of starting fights by implying that you won't go with the advice (which you didn't).

Will you guys eff’ing stop it already?



Either get a room or take it in private. This is getting out of hand. You’re both worse than children ffs.

I upvoted you, madjack. I’m done (although I don’t agree standing up for myself is childish). :wink:

Basically the issue happens because you need to call updateLogicalState() and updateGeometricState() on any root nodes that you manage yourself. Normally you wouldn’t need to do this because SimpleApplication.update() actually calls these methods on the rootNode and guiNode that are in SimpleApplication.



Its a fairly normal thing usually, but Normen gets nervous because this isn’t really mentioned in the wiki. Its fine to call these methods if you know what you’re doing.

Thanks Momoko_Fan for the more complete explanation.



I actually found out I don’t need to (or at least it appears I don’t need to) call updateGeometricState() or updateLogicalState() in my update loop, since nothing is moving within my map except the camera. I do need to just call it once to avoid the IllegalStateException, however. Working for now, at least. :slight_smile:



http://i.imgur.com/r02TE.png



Still lots to do to clean this up, but I’ve made lots of progress!

Looks great :slight_smile:

Yes if you know for 100% that the underlying scene won’t be changed, there’s no need to call these methods at all.

@Momoko_Fan said:
Looks great :)
Yes if you know for 100% that the underlying scene won't be changed, there's no need to call these methods at all.


...and as long as you don't have any controls.

Though it sounds like he swapped out the rootNode reference for a different node... in which case I guess the updateXXX methods are still getting called.

I don’t have any controls active during my map, so I should be set there.



I detached the default rootNode scene from the default ViewPort and put in a BaseMapNode instead… I suspect the updateXXX methods are not being called because I had to call it (at least once) to avoid the IllegalStateException.