MinGfx Toolkit  1.0
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
Static Public Member Functions | List of all members
mingfx::Platform Class Reference

Detailed Description

Provides access to the underlying file system and other platform-specific routines.

Definition at line 26 of file platform.h.

#include <platform.h>

Static Public Member Functions

static bool FileExists (const std::string &filename)
 True if filename is found and can be opened for reading on the system. More...
 
static std::string FindFile (const std::string &basename, const std::vector< std::string > &searchpath)
 
static std::string FindFile (const std::string &basename, const std::string &searchpath)
 
static std::string FindMinGfxDataFile (const std::string &basename)
 Searches for a data file that ships with MinGfx. More...
 
static std::string FindMinGfxShaderFile (const std::string &basename)
 Searches for a shader file that ships with MinGfx. More...
 

Member Function Documentation

◆ FileExists()

static bool mingfx::Platform::FileExists ( const std::string &  filename)
static

True if filename is found and can be opened for reading on the system.

◆ FindFile() [1/2]

static std::string mingfx::Platform::FindFile ( const std::string &  basename,
const std::string &  searchpath 
)
static

◆ FindFile() [2/2]

static std::string mingfx::Platform::FindFile ( const std::string &  basename,
const std::vector< std::string > &  searchpath 
)
static

◆ FindMinGfxDataFile()

static std::string mingfx::Platform::FindMinGfxDataFile ( const std::string &  basename)
static

Searches for a data file that ships with MinGfx.

This will look in the following locations in order:

  1. the current working directory.
  2. a subdirectory called data within the current working directory.
  3. the installed data directory INSTALL_PREFIX/share/MinGfx-1.0/data.
  4. the data directory in the MinGfx build tree. If the file is found, the full path is returned, else basename is returned.

◆ FindMinGfxShaderFile()

static std::string mingfx::Platform::FindMinGfxShaderFile ( const std::string &  basename)
static

Searches for a shader file that ships with MinGfx.

This will look in the following locations in order:

  1. the current working directory.
  2. a subdirectory called shaders within the current working directory.
  3. the installed shaders directory INSTALL_PREFIX/share/MinGfx-1.0/shaders.
  4. the shaders directory in the MinGfx build tree. If the file is found, the full path is returned, else basename is returned.

The documentation for this class was generated from the following file: