GameState: What goes into OGL? /Solved/

Hey All,

I am refactoring my project to the StandardGame format and am starting to use gamestates. Right now, I've got two gamestates: the UI, the "ingamestate"…both I've put into the OGL thread via the GameTaskQueueManager. I've looked at other examples, and they don't exactly put the whole "ingamestate" into the OGL thread, but very specific pieces of it, i.e. skybox.

Question is, how do I know what elements of my "ingamestate" to put into OGL. If it helps, ingamestate really has everything in there: avatars, skybox…other graphical elements.

…and can someone walk me through the whole "Callable" method when using GameTaskQueueManager? I've read this about 5 times and it's just not sinking in for some reason :wink:



There is a bunch of information on the wiki related to this.  I think you'll find everything you need there.

Hey Dark Frog,

I was hoping you'd answer :wink:

Yes, I've read this:

…and what I'd like is a bit of an expantion, if I could, of this in that same article:

"Now that we understand how to construct a game using this new paradigm, we need to talk about situations where you do have to inject something into the OpenGL thread. There are still many aspects of jME that do things directly to OpenGL and must not be invoked outside of the OpenGL thread as it causes

Well, darrenl… here is what I have been told and have read…

There are a bunch of things that must be done in the GL thread - some JME functions are safe in this respect but others need the GL thread. There is a non-comprehensive listing on this page in the WiKi. However I am afraid you have probably already gone over that and the entire StandardGame FAQ? Anyways I doubt anyone here on the forum will give you a definitive answer on the question of what must be in GL Thread. The most likely solution is trial and error… at least some vet suggested me that.

And about the Callable and GameTaskQueueManager - well I am certainly no expert on that… I guess it is more of a general Java Question - Callable, Future etc. GameTaskQueueManager just keeps a Queue of things you have thrown into it. And executes the items in the queue 1 by 1 in GL thread. But again, I am sure you knew that already.

Perhaps if you have more specific - detailed questions someone could try to clear them up, but otherwise I am afraid people will just keep referring you to the WiKi…  :expressionless:

Thanks Mindgamer…

You know what…I didn't know about those links. I've been just going off of the tutorial section…and holy crap, look at all of the info there. Thanks

…boy, I feel silly :wink:

Once again, me and the noobishness