Game Development Community

TGEA Mac - Full screen in Forge Demo results in black screen

by Robert Rose · in Torque Game Engine Advanced · 06/13/2009 (9:23 pm) · 14 replies

I tried running the Forge Demo in fullscreen on my mac but all I get is a black screen:

$pref::Video::mode = "1024 768 true 32 60 0";

The log doesn't show any errors.

Any idea what the deal is?

#1
06/22/2009 (8:47 pm)
I get the same thing from my Project that I ported over from Windows. Works fine when I start out in Windowed mode then fullscreen but with fullscreen saved and restarted I get the black screen as well.

Template works fine so I'm not sure what had happened. I only have added one .cpp file and did the 1_8_1 changes in the forum.
#2
06/23/2009 (12:52 am)
Same result here.

Going from windowed mode to fullscreen is OK.

Starting in fullscreen mode gives a black screen.

Until 1.8.0 (if I remember correctly), TGEA had problems with fullscreen on Mac.

Nicolas Buquet
www.buquet-net.com/cv/
#3
06/23/2009 (5:10 am)
I was hoping to narrow this down to guiFadeinBitmapCtrl since this is not an issue with Template, which just loads up the Main Menu.

I just tried doing that and still having issue.
#4
06/23/2009 (5:21 am)
Same happens with Stronghold and TGEDemoAdavanced. Can't say if T3D does this for sure because this is my Project.

Not sure what the difference is with Template. Wife is waiting so we can do a day trip so I probably won't get to do any more investigating today. Good luck to anyone who does.

#5
06/23/2009 (6:55 pm)
Well I have to go with this being a script issue with some kind of underlying source bug that isn't touched with "Template".

I added my source changes to a clean Template build and compiled. Also took that executable and copied it and put it in my personal project.

Results(Template) Worked as before with no issue when starting in full screen mode.

Results(My Project) Same as before. Starting in full screen mode results in a blank black screen.

So I'm still stumped as to the exact problem. Did a little bit of a diff with "filemerge" but didn't find anything that stood out to me.
#6
06/24/2009 (9:39 am)

Confirmed. Looking into this.

Interesting results with the difference between the projects.

The controls are there. If you click where the "Exit" button is supposed to be, it exits. So it's purely a rendering problem.
#7
07/01/2009 (11:47 am)
Hey Rene. Any progress on this? Also when you get the black screen and you command-tab out Torque goes windowed mode and crashes. I haven't looked into it since. Hopefully I will have a chance later this week. I really have no ideas as to why there is no problem in Template but everything else goes black.
#8
07/01/2009 (11:59 am)

Sorry, not yet. There's just lots going on at the moment (not all quite related to working with GG).

I want to have this fixed for Torque 3D's B4 and will post the changes here.

BTW, just for reference, this is THREED-493 in the tracker. Slap me around with this if you don't hear back soon.
#9
07/01/2009 (12:19 pm)
Ah thanks for the heads up. Ooh Torque 3D. So tempting. Must not buy yet and get distracted. ;)
#10
07/03/2009 (4:55 am)
Currently learning a nice new set of curses about the "most modern operating system in the world".

Rule of thumb: don't trigger breakpoints while the Crapple is doing some fullscreen stuff or the modernity of the whole thing is quite at its end. You can do input and stuff. No problem. Exit applications and all. Only it won't let you do away with this big black "shielding" window that is covering your entire desktop. It stays there even if the application that created it quits. Sigh.

The cause for the above problem appears to be that the video mode and GL context is never set up properly when starting out in fullscreen, but there's some other problems, too. Switching apps when in fullscreen will crash the engine as it seems to do a GFX reset right in the middle of rendering.

Will come back with more shortly.
#11
07/04/2009 (2:42 am)
Sorry to hear that you are having issues. I was hoping the problem wouldn't be too extensive.
#12
09/10/2009 (5:14 pm)
Okay, after a *long* delay, finally working on this again. Have it half-fixed for T3D. The rendering state comes out right now but the GUI system will have an issue where you need to click somewhere first in order for the cursor position to be correct again. Think it's the cursor tracking in GuiCanvas that is causing trouble again.

To resolve the black-screen issue replace GFXGLWindowTarget::makeActive() (in gfx/gl/gfxGLDevice.mac.mm) with this:

void GFXGLWindowTarget::makeActive()
{
   // If we're supposed to be running fullscreen, but haven't yet set up for it,
   // do it now.
   
   if( !mFullscreenContext && mWindow->getVideoMode().fullScreen )
   {
      static_cast< GFXGLDevice* >( mDevice )->zombify();
      _setupNewMode();
   }
      
   mFullscreenContext ? [(NSOpenGLContext*)mFullscreenContext makeCurrentContext] : [(NSOpenGLContext*)mContext makeCurrentContext];
}

//BTW: This can probably be solved more elegantly but I had to hard-reboot so often due to OSX's shitty fullscreen "functionality" rendering the system dysfunctional that I have no incentive to get any further into this.
#13
09/11/2009 (4:46 am)
Tested on my side : it works ! :-)

On MacBook Pro, Mac OSX.5.8, GeForce 8600M GT.

Thanks.

Nicolas Buquet
www.buquet-net.com/cv/
#14
02/07/2010 (4:25 am)
Long overdue to thank you, but Thanks ;)