本文整理汇总了C++中TexturePtr::Set方法的典型用法代码示例。如果您正苦于以下问题:C++ TexturePtr::Set方法的具体用法?C++ TexturePtr::Set怎么用?C++ TexturePtr::Set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TexturePtr
的用法示例。
在下文中一共展示了TexturePtr::Set方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Render
TexturePtr PostProcBlur::Render(QuadPtr fullScreenQuad, TexturePtr in)
{
fbo->Set();
glClearColor(0.f, 0.f, 0.f, 1.f);
loopi(effectPower)
{
fbo->EnableSingleBuffer(0);
if (i == 0)
{
in->Set(0);
}
else
{
vBlurTex->Set(0);
}
SetBindingSafe(hBlurShader, "screen", 0);
SetBindingSafe(hBlurShader, "screenWidth", (float)effectWidth);
SetBindingSafe(hBlurShader, "screenHeight", (float)effectHeight);
hBlurShader->Set();
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
fullScreenQuad->Render();
fbo->EnableSingleBuffer(1);
hBlurTex->Set(0);
SetBindingSafe(vBlurShader, "screen", 0);
SetBindingSafe(vBlurShader, "screenWidth", (float)effectWidth);
SetBindingSafe(vBlurShader, "screenHeight", (float)effectHeight);
vBlurShader->Set();
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
fullScreenQuad->Render();
}
fbo->Unset();
return vBlurTex;
}
示例2: Render
TexturePtr PostProcEdge::Render(QuadPtr fullScreenQuad, TexturePtr in)
{
m_fbo->Set();
glClearColor(0.f, 0.f, 0.f, 1.f);
m_fbo->EnableSingleBuffer(0);
in->Set(0);
SetBindingSafe(m_shader, "screen", 0);
SetBindingSafe(m_shader, "screenWidth", (float)effectWidth);
SetBindingSafe(m_shader, "screenHeight", (float)effectHeight);
m_shader->Set();
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
fullScreenQuad->Render();
m_fbo->Unset();
return m_tex;
}