本文整理汇总了C++中Loader::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ Loader::Load方法的具体用法?C++ Loader::Load怎么用?C++ Loader::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader::Load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnResourceLoaded
void Window::OnResourceLoaded()
{
DataStreamPtr stream = mSource->GetDataStream();
if (stream != NULL)
{
Loader loader;
mLayout = loader.Load(stream, NULL);
d_assert(mLayout != NULL);
OnLoaded();
}
}
示例2: main
int main(int argc, char* argv[])
{
#if 1
PathName src = argv[1];
PathName dst = src.ChangeExtension("fxc");
#else
PathName src = "C:/Proj/Lumino/src/Scene/Resource/SSBasic2D.fx";
PathName dst = src.ChangeExtension("fxc");
#endif
Effect effect;
Loader loader;
loader.Load(&effect, src);
Generator gen;
gen.Generate(&effect, dst);
#if 0
std::string shaderSource;
std::ofstream ofs("shader.txt");
ofs << "test";
if (argc < 2)
{
return 1;
}
DXDevice device;
if (!device.initlaize())
{
printf("failed initialize DirectX.\n");
device.finalize();
return 1;
}
//Converter converter;
//converter.convert( "D:/Proj/LightNote/Source/Core/Resource/Shader/SSBasic3D.fx", &device );
/*if ( Hlsl2Glsl_Initialize() == 0 ) {
printf( "failed Hlsl2Glsl_Initialize.\n" );
return 1;
}*/
//converter.convert( "SSBasic2D.fx", &device );
//converter.convert( "SSBasic3D.fx", &device );
//converter.convert( "MirrorWater_low.fxm", &device );
//converter.convert( "full.fx", &device );
for (int i = 1; i < argc; ++i)
{
Converter converter;
converter.convert(argv[i], &device);
}
//Hlsl2Glsl_Shutdown();
device.finalize();
#endif
return 0;
}