GameState Init on GL Thread


Im using StandardGame and using GameStates.

But im having many troubles on loading thing that must be on OGL Thread because the GameState doesn't have a init on OGL thread.

What about a init method on GameState?

For example, i need to load 3d Text, it must be created on OGL Thread. So i have to make that ugly Callable call implementation. If we have a init method on OGL Thread so i make my initializations that need ogl.

What do you guys think about that?

Extend Game State. Use the constructor. GameStates (Trussell’s Method)

Make it a suggestion. Or you could make a patch and submit it to the forum to have it applied.

I think the reason for not running the init in OGL is that you may want to initialize stuff there that does NOT have to be in GL thread… And by forcing the init into just this one thread it will slow down initialization.

Lets see what the frog will say about this :slight_smile:

So i think that could exists two initializations.

One exclusively for GL Thread.

Trussell said:

Extend Game State. Use the constructor. GameStates (Trussell's Method)

The problem lies on OGL Thread. With SimpleGame the simpleInitGame IS ON OGL THREAD.
Im using StandardGame. My suggestion is to make a init "OGLed" on the GameState to be usable with StandardGame.

By the way, thanks.

OH I get what you mean. I'm sorry–I didn't read carefully enough.