本文整理汇总了C++中FTexture::GetTopOffset方法的典型用法代码示例。如果您正苦于以下问题:C++ FTexture::GetTopOffset方法的具体用法?C++ FTexture::GetTopOffset怎么用?C++ FTexture::GetTopOffset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FTexture
的用法示例。
在下文中一共展示了FTexture::GetTopOffset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Render
//.........这里部分代码省略.........
// keep GCC quiet.
return;
case RF_CLIPFULL:
if (curline->backsector == NULL)
{
mceilingclip = walltop;
mfloorclip = wallbottom;
}
else
{
mceilingclip = walltop;
mfloorclip = thread->OpaquePass->ceilingclip;
needrepeat = 1;
}
break;
case RF_CLIPUPPER:
mceilingclip = walltop;
mfloorclip = thread->OpaquePass->ceilingclip;
break;
case RF_CLIPMID:
return;
case RF_CLIPLOWER:
mceilingclip = thread->OpaquePass->floorclip;
mfloorclip = wallbottom;
break;
}
}
yscale = decal->ScaleY;
texturemid = WallSpriteTile->GetTopOffset(0) + (zpos - thread->Viewport->viewpoint.Pos.Z) / yscale;
// Clip sprite to drawseg
x1 = MAX<int>(clipper->x1, x1);
x2 = MIN<int>(clipper->x2, x2);
if (x1 >= x2)
{
return;
}
ProjectedWallTexcoords walltexcoords;
walltexcoords.Project(thread->Viewport.get(), WallSpriteTile->GetWidth(), x1, x2, WallT);
if (flipx)
{
int i;
int right = (WallSpriteTile->GetWidth() << FRACBITS) - 1;
for (i = x1; i < x2; i++)
{
walltexcoords.UPos[i] = right - walltexcoords.UPos[i];
}
}
// Prepare lighting
calclighting = false;
usecolormap = basecolormap;
rereadcolormap = true;
// Decals that are added to the scene must fade to black.
if (decal->RenderStyle == LegacyRenderStyles[STYLE_Add] && usecolormap->Fade != 0)
{
usecolormap = GetSpecialLights(usecolormap->Color, 0, usecolormap->Desaturate);