本文整理汇总了C++中LLFloater::calcScreenRect方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloater::calcScreenRect方法的具体用法?C++ LLFloater::calcScreenRect怎么用?C++ LLFloater::calcScreenRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloater
的用法示例。
在下文中一共展示了LLFloater::calcScreenRect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: display
//.........这里部分代码省略.........
gPipeline.mDeferredScreen.clear();
}
else
{
gPipeline.mScreen.bindTarget();
if (LLPipeline::sUnderWaterRender && !gPipeline.canUseWindLightShaders())
{
const LLColor4 &col = LLDrawPoolWater::sWaterFogColor;
glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f);
}
gPipeline.mScreen.clear();
}
gGL.setColorMask(true, false);
}
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderGeom");
if (!(LLAppViewer::instance()->logoutRequestSent() && LLAppViewer::instance()->hasSavedFinalSnapshot())
&& !gRestoreGL)
{
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
static LLCachedControl<bool> render_ui_occlusion("RenderUIOcclusion", false);
if(render_ui_occlusion && LLGLSLShader::sNoFixedFunction)
{
LLFloater* floaterp = gFloaterView->getFrontmost();
if(floaterp && floaterp->getVisible() && floaterp->isBackgroundVisible() && floaterp->isBackgroundOpaque())
{
LLGLDepthTest depth(GL_TRUE, GL_TRUE);
gGL.setColorMask(false, false);
gOcclusionProgram.bind();
LLRect rect = floaterp->calcScreenRect();
rect.stretch(-1);
gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
gGL.loadIdentity();
gGL.ortho(0.0f, gViewerWindow->getWindowWidth(), 0.0f, gViewerWindow->getWindowHeight(), 0.f, 1.0f);
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
gGL.loadIdentity();
gGL.color4fv( LLColor4::white.mV );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.begin( LLRender::QUADS );
gGL.vertex3f(rect.mLeft, rect.mTop,0.f);
gGL.vertex3f(rect.mLeft, rect.mBottom,0.f);
gGL.vertex3f(rect.mRight, rect.mBottom,0.f);
gGL.vertex3f(rect.mRight, rect.mTop,0.f);
gGL.end();
gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
gOcclusionProgram.unbind();
}
}
static LLCachedControl<bool> render_depth_pre_pass("RenderDepthPrePass", false);
if (render_depth_pre_pass && LLGLSLShader::sNoFixedFunction)
{
LLGLDepthTest depth(GL_TRUE, GL_TRUE);
LLGLEnable cull_face(GL_CULL_FACE);
gGL.setColorMask(false, false);