ToAbsolutePathname

static std::string ToAbsolutePathname(
std::string pathname )

Converts the relative path + filename to an absolute path + filename.

All OpenLayer's own loading functions accept both relative and absolute pathnames.

If the passed pathname is already absolute, the passed pathname is returned unmodified. This function can only be used after Setup::SetupScreen is called.

Examples

string relativePathname = "data/SomeTextFile.txt";

// Convert the relative pathname to absolute //
// (For example, C:/mygames/mycoolgame/data/SomeTextFile.txt) //
string absolutePathname = Setup::ToAbsolutePath( relativePathname );


Other functions of the class Setup
SetupProgram
Sets up OpenLayer and the other libraries
SetupScreen
Sets up the program window or the fullscreen mode
GetWindowWidth
Returns the width of the program window
GetWindowHeight
Returns the height of the program window
GetColorDepth
Returns the color depth of the program window
GetExecutablePath
Returns the path of the program executable
ToAbsolutePathname
Converts the relative pathname to an absolute one

Advanced functions

IsProgramSetUp
Returns true if SetupProgram is called
IsScreenSetUp
Returns true if SetupScreen is called


Questions about ToAbsolutePathname? Click here.