Black Screen with Status bar and nothing being rendered.

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
xxpokerxx
Gnoblar
Posts: 7
Joined: Sun Jul 24, 2011 8:18 pm

Black Screen with Status bar and nothing being rendered.

Post by xxpokerxx »

Hi all,

I am having trouble getting my ogre project running on iOS. I am trying to port a windows project i did to iOS, I have ported all files and it is compiling and running without errors or exceptions. however all thats happening when i run the project is the screen rotates, the status bar is still showing (even though i said to hide it) and a black screen is visible. I have a multitouchlistener listening for touch and just a black screen that is not registering touch either.

I stepped through the program and it looks like my custom game loop is running. I am at a loss as to why this is not working.

has anyone ever encountered this ? also if anyone would be willing to take a look at my project i would really appreciate it :) I really need this running ASAP and I just cant figure out why its not working :(

Thanks.
xxpokerxx
farrer
Halfling
Posts: 69
Joined: Mon Sep 12, 2011 7:35 pm
x 13

Re: Black Screen with Status bar and nothing being rendered.

Post by farrer »

Hello,

verify if you aren't "holding" the thread with an infinite loop at applicationDidFinishLaunching or somewhere else (I was getting this when calling with a main loop at this function).

Instead, for the iOS, use the renderOneFrame to just do a single frame, removing the main loop when compiling for iOS, as show:

Code: Select all

- (void)renderOneFrame:(id)sender
{
   gameApp->run();
}
and

Code: Select all

void gameClass::run()
{

#if OGRE_PLATFORM != OGRE_PLATFORM_APPLE_IOS
   while(!exit)
   {
      if(timeElapsed > UPDATE_RATE)
      {
         updateTimer.reset();
#endif

        yourloopcodehere();

        /* Update the window */
        ogreWindow->update();

#if OGRE_PLATFORM != OGRE_PLATFORM_APPLE_IOS
    }
}
#endif


Hope it helps you... (Note: I'm using Ogre 1.8. for Ogre 1.7, change OGRE_PLATFORM_APPLE_IOS for OGRE_PLATFORM_IPHONE)
xxpokerxx
Gnoblar
Posts: 7
Joined: Sun Jul 24, 2011 8:18 pm

Re: Black Screen with Status bar and nothing being rendered.

Post by xxpokerxx »

I have already fixed this, and it turned out that exactly what it was, thanks anyway.