本文整理汇总了C++中TextureUnitState::setCubicTextureName方法的典型用法代码示例。如果您正苦于以下问题:C++ TextureUnitState::setCubicTextureName方法的具体用法?C++ TextureUnitState::setCubicTextureName怎么用?C++ TextureUnitState::setCubicTextureName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextureUnitState
的用法示例。
在下文中一共展示了TextureUnitState::setCubicTextureName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
TextureUnitState a;
std::string str = "";
a.setCubicTextureName(str);
a.setCubicTextureName(&str);
std::cout << "done" << std::endl;
}
示例2: preAddToRenderState
//-----------------------------------------------------------------------
bool RTShaderSRSTexturedFog::preAddToRenderState(const RenderState* renderState, Pass* srcPass, Pass* dstPass)
{
if (mFactory == NULL)
return false;
FogMode fogMode;
ColourValue newFogColour;
Real newFogStart, newFogEnd, newFogDensity;
if (srcPass->getFogOverride())
{
fogMode = srcPass->getFogMode();
newFogStart = srcPass->getFogStart();
newFogEnd = srcPass->getFogEnd();
newFogDensity = srcPass->getFogDensity();
mPassOverrideParams = true;
}
else
{
SceneManager* sceneMgr = ShaderGenerator::getSingleton().getActiveSceneManager();
if (sceneMgr == NULL)
{
fogMode = FOG_NONE;
newFogStart = 0.0;
newFogEnd = 0.0;
newFogDensity = 0.0;
}
else
{
fogMode = sceneMgr->getFogMode();
newFogStart = sceneMgr->getFogStart();
newFogEnd = sceneMgr->getFogEnd();
newFogDensity = sceneMgr->getFogDensity();
}
mPassOverrideParams = false;
}
// Set fog properties.
setFogProperties(fogMode, newFogStart, newFogEnd, newFogDensity);
// Override scene fog since it will happen in shader.
dstPass->setFog(true, FOG_NONE, ColourValue::White, newFogDensity, newFogStart, newFogEnd);
TextureUnitState* tus = dstPass->createTextureUnitState(mFactory->getBackgroundTextureName());
tus->setCubicTextureName(mFactory->getBackgroundTextureName(), true);
mBackgroundSamplerIndex = dstPass->getNumTextureUnitStates() - 1;
return true;
}