本文整理汇总了C++中VisualEffectInstance::GetPass方法的典型用法代码示例。如果您正苦于以下问题:C++ VisualEffectInstance::GetPass方法的具体用法?C++ VisualEffectInstance::GetPass怎么用?C++ VisualEffectInstance::GetPass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VisualEffectInstance
的用法示例。
在下文中一共展示了VisualEffectInstance::GetPass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vba
//.........这里部分代码省略.........
int* indices = (int*)ibuffer->GetData();
const int bound01 = bound0*bound1;
int j0, j1, j2, j3;
for (i2 = 0; i2 < bound2; ++i2)
{
for (i1 = 0; i1 < bound1M1; ++i1)
{
for (i0 = 0; i0 < bound0M1; ++i0)
{
j0 = i0 + bound0*(i1 + bound1*i2);
j1 = j0 + 1;
j2 = j1 + bound0;
j3 = j2 - 1;
*indices++ = j0;
*indices++ = j1;
*indices++ = j2;
*indices++ = j0;
*indices++ = j2;
*indices++ = j3;
}
}
}
for (i1 = 0; i1 < bound1; ++i1)
{
for (i2 = 0; i2 < bound2M1; ++i2)
{
for (i0 = 0; i0 < bound0M1; ++i0)
{
j0 = i0 + bound0*(i1 + bound1*i2);
j1 = j0 + 1;
j2 = j1 + bound01;
j3 = j2 - 1;
*indices++ = j0;
*indices++ = j1;
*indices++ = j2;
*indices++ = j0;
*indices++ = j2;
*indices++ = j3;
}
}
}
for (i0 = 0; i0 < bound0; ++i0)
{
for (i1 = 0; i1 < bound1M1; ++i1)
{
for (i2 = 0; i2 < bound2M1; ++i2)
{
j0 = i0 + bound0*(i1 + bound1*i2);
j1 = j0 + bound0;
j2 = j1 + bound01;
j3 = j2 - bound0;
*indices++ = j0;
*indices++ = j1;
*indices++ = j2;
*indices++ = j0;
*indices++ = j2;
*indices++ = j3;
}
}
}
mCube = new0 TriMesh(vformat, vbuffer, ibuffer);
UpdateVertexBuffer();
#endif
mNumIndices = ibuffer->GetNumElements();
mIndices = new1<int>(mNumIndices);
memcpy(mIndices, ibuffer->GetData(), mNumIndices*sizeof(int));
// Create the cube effect.
#ifdef USE_PARTICLES
std::string path = Environment::GetPathR("Disk.wmtf");
Texture2D* texture = Texture2D::LoadWMTF(path);
VisualEffectInstance* instance =
VertexColor4TextureEffect::CreateUniqueInstance(texture,
Shader::SF_NEAREST, Shader::SC_CLAMP_EDGE, Shader::SC_CLAMP_EDGE);
#else
VertexColor4Effect* effect = new0 VertexColor4Effect();
VisualEffectInstance* instance = effect->CreateInstance();
#endif
const VisualPass* pass = instance->GetPass(0);
AlphaState* astate = pass->GetAlphaState();
astate->BlendEnabled = true;
CullState* cstate = pass->GetCullState();
cstate->Enabled = false;
DepthState* dstate = pass->GetDepthState();
dstate->Enabled = false;
dstate->Writable = false;
mCube->SetEffectInstance(instance);
mScene = new0 Node();
mScene->AttachChild(mCube);
}