[Mac] That bloody extra window behind your game canvas...
by Ronny Bangsund · in Torque Game Builder · 02/20/2011 (7:40 am) · 4 replies
There's this extra canvas appearing behind the game canvas, typically 320x240. It looks frickin' unprofessional, so I went on a merciless bughunt. I've annihilated it with extreme prejudice.
In macCarbOGLVideo.cc there is a method called OpenGLDevice::activate(). Kill it. Remove the contents and keep returning true. That's it. Games run both windowed and fullscreen without any of the setup inside there, but the extra canvas no longer appears.
If you feel like doing more work, just remove the method and hunt down where it gets called. It's completely unnecessary, as the AGL context is set up (twice[1]!) in other places anyway, and sync is handled in the real canvas setup.
[1] There is a "safety net" GL context created early on, to catch "naughty objects". Question: Why do objects even start pooping out graphics before setup is finished?
In macCarbOGLVideo.cc there is a method called OpenGLDevice::activate(). Kill it. Remove the contents and keep returning true. That's it. Games run both windowed and fullscreen without any of the setup inside there, but the extra canvas no longer appears.
If you feel like doing more work, just remove the method and hunt down where it gets called. It's completely unnecessary, as the AGL context is set up (twice[1]!) in other places anyway, and sync is handled in the real canvas setup.
[1] There is a "safety net" GL context created early on, to catch "naughty objects". Question: Why do objects even start pooping out graphics before setup is finished?
About the author
(Waiting for UTF-8 to work again!) ಥ_ಥ
#2
08/11/2011 (9:31 pm)
Well I personally used a mac with TGB and macs have problems with torque most of the time so just get a windows computer, try to run TGB in wine, or run windows in virtual box then run torque.
#3
@Josh: That's terrible advice.
08/11/2011 (10:18 pm)
@Joseph: The file is in the Xcode project. You need TGB Pro.@Josh: That's terrible advice.
#4
@Josh: That really is a horrible suggestion. If you believe that anybody is going to go through the trouble of doing all that for a game, you seriously misunderstand the market.
08/14/2011 (11:11 am)
Nice find, Ronny, thanks. I hadn't really looked too much into it (most of my work on the Mac side is usually with iT2D), but I'll be jumping in and popping this out of my stuff. ;3@Josh: That really is a horrible suggestion. If you believe that anybody is going to go through the trouble of doing all that for a game, you seriously misunderstand the market.
Torque Owner Joseph Rioux
I've noticed the same problem on my mac and I agree that it looks stupid! But when I plugged that file name into spotlight it came up with nothing… where did you find it on your computer?
Hope your project(s) are going well!