View Full Version : OpenGL Profiler, or, "where did all my files go?"
sealfin
2004.09.02, 05:49 AM
Very quick question: when launching an app from OpenGL Profiler, where is the current working directory set?
The app in question is an SDL app which uses the default SDL working directory, and launches without error from the Finder.
OneSadCookie
2004.09.02, 05:08 PM
SDL changes the CWD itself, so I wouldn't have thought there'd be a problem here...
Might be worth checking the SDL source to see if it looks for the -psn_\d+ argument the finder sends, and uses that to decide whether to change the directory.
Might be worth running the GL profiler from the directory you want to be the CWD, too.
sealfin
2004.09.03, 04:19 AM
Followed your suggestion and found this in the Objective-C code which the SDL templates include by default in each project...
if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 )
{
gArgc = 1;
gFinderLaunch = YES;
}
else
{
gArgc = argc;
gFinderLaunch = YES; // I've altered this; return to "NO" if odd bugs occur...bookmarked.
}
...I'm ignorant of Objective-C, but this alteration seems to have had the desired affect: the app now launches without error from Xcode, the Finder, and OpenGL Profiler. Where I discovered the app is spending 61% of the time in glDeleteTextures() :blink: )
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.