I have an engine that is running on the pc quite well. I am trying to get it to run on Android now using NativeAcitivity. I had it ported using SDL and was ok, but wanted to get away from SDL. so i implemented the native activity example but my problem is now i believe threading...
my android main is setup much like the one in SDL is,
[source lang="cpp"]void android_main(struct android_app* state) { // Make sure glue isn't stripped. app_dummy(); // Store our state for later use __state = state; // Create the execution context and the engine SharedPtr<Context> context(new Context()); SharedPtr<Engine> engine(new Engine(context)); // Give the game object the engine context game->SetContext(context); game->SetEngine(engine); if (!game->Initialize()) { ErrorDialog("Aurora", context->GetSubsystem<Log>()->GetLastMessage()); } else { while (!game->IsExiting()) { game->Run(); } } return;}[/source]
then once inside of game initialize, i have the engine startup, and fire off the needed subsystems. however, i am getting things loaded prior to when they are supposed to be loaded. even when i purposely BLOCK them using an infinite loop, they still get executed as if a second thread has fired, creating a second engine, and thus filling in the values. i am not really sure what is going on and was hoping someone could point me in a direction for help.
thanks much
Android NDK Native Activity + Game Engine
Started by NiteLordz, Oct 13 2012 01:28 PM
No replies to this topic






