25 #ifndef SCG_UTILITIES_H_ 26 #define SCG_UTILITIES_H_ 31 #include <GLFW/glfw3.h> 39 const float PI = 3.141592654f;
96 std::string
getFullFileName(
const std::vector<std::string>& filePaths,
const std::string& fileName);
112 void splitFilePath(
const std::string& filePath, std::vector<std::string>& splitPaths);
bool isGLContextActive()
Check if an active OpenGL context exists.
void setCursorPosPixels(GLFWwindow *window, double xPixels, double yPixels)
Set cursor (mouse pointer) position in pixels, as opposed to screen coordinates.
void formatFilePath(std::string &filePath)
Replace backslashes by slashes and ensure that the last character is a slash.
void splitFilePath(const std::string &filePath, std::vector< std::string > &splitPaths)
Split string containing one or more file paths into a vector of single paths.
void getCursorPosPixels(GLFWwindow *window, double &xPixels, double &yPixels)
Get cursor (mouse pointer) position in pixels, as opposed to screen coordinates.
Local header file for GLEW library.
int checkGLError()
Check if an OpenGL error has occured since last call of checkGLError().
void printUniformBlockInformation(GLuint program, int nMembers, const GLchar **uniformNames)
Print information about uniform blocks in shaders.
std::string getFullFileName(const std::vector< std::string > &filePaths, const std::string &fileName)
Try to find file name in a list of file paths.