本文整理汇总了C++中Problem::Shutdown方法的典型用法代码示例。如果您正苦于以下问题:C++ Problem::Shutdown方法的具体用法?C++ Problem::Shutdown怎么用?C++ Problem::Shutdown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Problem
的用法示例。
在下文中一共展示了Problem::Shutdown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NullProblem
// --------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------
ProblemFactory::ProblemFactory(bool _skipInit)
{
Problem* newProb = nullptr;
// Null
newProb = new NullProblem();
if (_skipInit || newProb->Init()) {
if (!_skipInit) {
newProb->Shutdown();
}
mProblems.push_back(newProb);
mSolutions[mProblems.back()->GetName()].push_back(new NullSolution());
} else {
newProb->Shutdown();
SafeDelete(newProb);
console::error("Unable to create the Null Problem--exiting.");
}
// DynamicStreaming
newProb = new DynamicStreamingProblem();
if (_skipInit || newProb->Init()) {
if (!_skipInit) {
newProb->Shutdown();
}
mProblems.push_back(newProb);
mSolutions[mProblems.back()->GetName()].push_back(new DynamicStreamingGLBufferSubData());
mSolutions[mProblems.back()->GetName()].push_back(new DynamicStreamingGLMapUnsynchronized());
mSolutions[mProblems.back()->GetName()].push_back(new DynamicStreamingGLMapPersistent());
#if WITH_D3D11
mSolutions[mProblems.back()->GetName()].push_back(new DynamicStreamingD3D11MapNoOverwrite());
mSolutions[mProblems.back()->GetName()].push_back(new DynamicStreamingD3D11UpdateSubresource());
#endif
} else {
newProb->Shutdown();
SafeDelete(newProb);
}
// UntexturedObjects
newProb = new UntexturedObjectsProblem();
if (_skipInit || newProb->Init()) {
if (!_skipInit) {
newProb->Shutdown();
}
mProblems.push_back(newProb);
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLUniform());
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLDrawLoop());
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLMultiDraw(true));
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLMultiDraw(false));
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLMultiDrawBuffer(true));
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLMultiDrawBuffer(false));
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLBindless());
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLBindlessIndirect());
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLBufferRange());
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLBufferStorage(true));
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLBufferStorage(false));
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLDynamicBuffer());
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLMapUnsynchronized());
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLMapPersistent());
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsGLTexCoord());
#if WITH_D3D11
mSolutions[mProblems.back()->GetName()].push_back(new UntexturedObjectsD3D11Naive());
#endif
} else {
newProb->Shutdown();
SafeDelete(newProb);
}
// Textured Quads
newProb = new TexturedQuadsProblem();
if (_skipInit || newProb->Init()) {
if (!_skipInit) {
newProb->Shutdown();
}
mProblems.push_back(newProb);
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLBindless());
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLBindlessMultiDraw());
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLNaive());
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLNaiveUniform());
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLNoTex());
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLNoTexUniform());
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLSparseBindlessTextureArray());
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLSparseBindlessTextureArrayMultiDraw(true));
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLSparseBindlessTextureArrayMultiDraw(false));
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLTextureArray());
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLTextureArrayUniform());
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLTextureArrayMultiDraw(true));
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLTextureArrayMultiDraw(false));
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLTextureArrayMultiDrawBuffer(true));
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsGLTextureArrayMultiDrawBuffer(false));
#if WITH_D3D11
mSolutions[mProblems.back()->GetName()].push_back(new TexturedQuadsD3D11Naive());
#endif
} else {
newProb->Shutdown();
SafeDelete(newProb);
}
}