OpenGL Profiler, or, "where did all my files go?"

Moderator
Posts: 704
Joined: 2002.04
Post: #1
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.

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
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.
Quote this message in a reply
Moderator
Posts: 704
Joined: 2002.04
Post: #3
Followed your suggestion and found this in the Objective-C code which the SDL templates include by default in each project...
Code:
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 )

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenAL - Ogg files vs Caf files Fred9000 8 14,612 Aug 23, 2011 08:01 PM
Last Post: ipeku
  Is the profiler lying/can GL use previous binds/will... Jones 50 16,790 Sep 26, 2006 03:53 PM
Last Post: akb825
  OpenGL profiler 3.2 - 0.0 Frame Rate? kelvin 0 2,582 Mar 3, 2006 01:21 AM
Last Post: kelvin
  OpenGL Profiler Nick 15 6,738 Mar 29, 2005 06:56 PM
Last Post: Nick
  Loading TGA files to openGL Textures Joseph Duchesne 23 13,618 Aug 25, 2004 01:20 AM
Last Post: NCarter