本文整理汇总了C++中Tone::hasEffect方法的典型用法代码示例。如果您正苦于以下问题:C++ Tone::hasEffect方法的具体用法?C++ Tone::hasEffect怎么用?C++ Tone::hasEffect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tone
的用法示例。
在下文中一共展示了Tone::hasEffect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: needsEffectRender
bool needsEffectRender(bool flashing)
{
bool rectEffective = !rect->isEmpty();
bool colorToneEffective = color->hasEffect() || tone->hasEffect() || flashing;
return (rectEffective && colorToneEffective && isOnScreen);
}
示例2: redrawBaseTex
void redrawBaseTex()
{
if (nullOrDisposed(windowskin))
return;
if (base.tex.tex == TEX::ID(0))
return;
FBO::bind(base.tex.fbo);
/* Clear texture */
glState.clearColor.pushSet(Vec4());
FBO::clear();
glState.clearColor.pop();
glState.viewport.pushSet(IntRect(0, 0, base.tex.width, base.tex.height));
glState.blend.pushSet(false);
ShaderBase *shader;
if (backOpacity < 255 || tone->hasEffect())
{
PlaneShader &planeShader = shState->shaders().plane;
planeShader.bind();
planeShader.setColor(Vec4());
planeShader.setFlash(Vec4());
planeShader.setTone(tone->norm);
planeShader.setOpacity(backOpacity.norm);
shader = &planeShader;
}
else
{
shader = &shState->shaders().simple;
shader->bind();
}
windowskin->bindTex(*shader);
TEX::setSmooth(true);
shader->setTranslation(Vec2i());
shader->applyViewportProj();
/* Draw stretched layer */
base.vert.draw(0, 1);
glState.blend.set(true);
glState.blendMode.pushSet(BlendKeepDestAlpha);
/* Draw tiled layer */
base.vert.draw(1, base.bgTileQuads);
glState.blendMode.set(BlendNormal);
/* If we used plane shader before, switch to simple */
if (shader != &shState->shaders().simple)
{
shader = &shState->shaders().simple;
shader->bind();
shader->setTranslation(Vec2i());
shader->applyViewportProj();
windowskin->bindTex(*shader);
}
base.vert.draw(1+base.bgTileQuads, base.borderQuads);
TEX::setSmooth(false);
glState.blendMode.pop();
glState.blend.pop();
glState.viewport.pop();
}