当前位置: 首页>>代码示例>>C++>>正文


C++ FilePath::filepath方法代码示例

本文整理汇总了C++中FilePath::filepath方法的典型用法代码示例。如果您正苦于以下问题:C++ FilePath::filepath方法的具体用法?C++ FilePath::filepath怎么用?C++ FilePath::filepath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FilePath的用法示例。


在下文中一共展示了FilePath::filepath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: find

std::string ResourceManager::find(std::string filename) {
	FilePath fp = paths.find(filename);
	std::string result = fp.filepath();
	if (result == "") {
		AL_WARN("al::ResourceManager: could not find: %s", filename.c_str());
		return "";
	} else {
		return result;
	}

}
开发者ID:AlloSphere-Research-Group,项目名称:AlloSystem,代码行数:11,代码来源:al_ResourceManager.cpp

示例2: main

int main (int argc, char * const argv[]) {
	searchpaths.addAppPaths(argc, argv);
	searchpaths.addSearchPath(searchpaths.appPath() + "../../share");
	searchpaths.print();

	// load in a "scene"
	FilePath path = searchpaths.find("ducky.obj");
	printf("reading %s\n", path.filepath().c_str());

	ascene = Scene::import(path.filepath());
	if (ascene==0) {
		printf("error reading %s\n", path.filepath().c_str());
		return -1;
	} else {
		ascene->getBounds(scene_min,scene_max);
		scene_center = (scene_min + scene_max) / 2.f;
		ascene->dump();
	}
	File frag_file(searchpaths.find("basicFragment.glsl"), "r", true);
	File vert_file(searchpaths.find("basicVertex.glsl"), "r", true);

	printf("frag_file %s\n", frag_file.path().c_str());
	printf("vert_file %s\n", vert_file.path().c_str());

	frag.source(frag_file.readAll(), Shader::FRAGMENT);
	vert.source(vert_file.readAll(), Shader::VERTEX);

	win1.add(new StandardWindowKeyControls);
	win1.create(Window::Dim(640, 480));

	Image img(searchpaths.find("hubble.jpg").filepath());
	tex.allocate(img.array());

	MainLoop::start();

	return 0;
}
开发者ID:AlloSphere-Research-Group,项目名称:AlloSystem,代码行数:37,代码来源:modelShader.cpp

示例3: MyApp

  MyApp() {
    // search for the font in the root directory
    // in this case, our font lives here: allocore/share/fonts/
    SearchPaths searchPaths;
    searchPaths.addSearchPath(".");
    FilePath filePath = searchPaths.find("VeraMoIt.ttf");
    if (!filePath.valid()) {
      cerr << "Font file not found! Exiting..." << endl;
      exit(1);
    }
    font = new Font(filePath.filepath(), 20);

    mesh.primitive(Graphics::TRIANGLES);
    addSphere(mesh, 1.0, 32, 32);
  }
开发者ID:AlloSphere-Research-Group,项目名称:AlloSystem,代码行数:15,代码来源:omniTextRendering.cpp

示例4: Impl

File::File(const FilePath& path, const std::string& mode, bool open_)
:	mImpl(new Impl()), 
	mPath(path.filepath()), mMode(mode), mContent(0), mSizeBytes(0), mFP(0)
{	if(open_) open(); }
开发者ID:gitelope,项目名称:AlloSystem,代码行数:4,代码来源:al_FileAPR.cpp

示例5: watch

	void watch(FilePath f, bool immediate=true) { watch(f.filepath(), immediate); }
开发者ID:AlloSphere-Research-Group,项目名称:AlloSystem,代码行数:1,代码来源:al_FileWatcher.hpp


注:本文中的FilePath::filepath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。