std::string DataPath() { #ifdef MACOSX return BundlePath() + "/Contents/Resources" ; #else return BundlePath() + "/data"; #endif }
Program CompileShader(const char *vsh_filename, const char *fsh_filename, BindAttribs bind_attribs) { char vsh_src[kBuffer20] = {0}; char fsh_src[kBuffer20] = {0}; char path_buffer[kBuffer10] = {0}; BundlePath("Shader.vsh", path_buffer); ReadFile(path_buffer, vsh_src); BundlePath("Shader.fsh", path_buffer); ReadFile(path_buffer, fsh_src); return CompileShaderSource(vsh_src, fsh_src, bind_attribs); }