本文整理汇总了C++中TextureList::BindTexture方法的典型用法代码示例。如果您正苦于以下问题:C++ TextureList::BindTexture方法的具体用法?C++ TextureList::BindTexture怎么用?C++ TextureList::BindTexture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextureList
的用法示例。
在下文中一共展示了TextureList::BindTexture方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GL_DrawSky
void GL_DrawSky()
{
float angle;
FTexture *tex;
bool drawBoth = false;
int sky1tex, sky2tex;
int s1p, s2p;
drawBoth = !((level.flags & LEVEL_SWAPSKIES) || (sky2texture == sky1texture));
if ((level.flags & LEVEL_SWAPSKIES) || (sky2texture == sky1texture))
{
sky1tex = sky2texture;
s1p = sky2pos;
sky2tex = sky1texture;
s2p = sky1pos;
}
else
{
sky1tex = sky1texture;
s1p = sky1pos;
sky2tex = sky2texture;
s2p = sky2pos;
}
glDepthMask(GL_FALSE);
glDisable(GL_DEPTH_TEST);
glDisable(GL_FOG);
glDisable(GL_ALPHA_TEST);
glPushMatrix();
angle = s2p * 1.f / (FRACUNIT * 2.f);
glRotatef(-angle, 0.f, 1.f, 0.f);
textureList.BindTexture(sky2tex, true);
tex = TexMan(sky2tex);
texw = tex->GetWidth();
texh = tex->GetHeight();
tx = ty = 1.f;
yMult = 1.f;
GL_RenderSkyHemisphere(SKYHEMI_UPPER);
GL_RenderSkyHemisphere(SKYHEMI_LOWER);
if (drawBoth)
{
angle = (s1p * 1.f / (FRACUNIT * 2.f)) - angle;
glRotatef(-angle, 0.f, 1.f, 0.f);
tex = TexMan(sky1tex);
textureList.BindTexture(sky1tex, true);
texw = tex->GetWidth();
texh = tex->GetHeight();
if (level.flags & LEVEL_DOUBLESKY && texh <= 128)
{
yMult = 2.f;
}
tx = ty = 1.f;
GL_RenderSkyHemisphere(SKYHEMI_UPPER);
GL_RenderSkyHemisphere(SKYHEMI_LOWER);
}
glPopMatrix();
glEnable(GL_DEPTH_TEST);
glEnable(GL_ALPHA_TEST);
glFogf(GL_FOG_MODE, GL_EXP);
glDepthMask(GL_TRUE);
if (gl_depthfog && !Player->fixedcolormap)
{
glEnable(GL_FOG);
}
}