Commit b98b1c19 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

engine: add missing buildgl_bindSamplerObject() calls

parent 255ae1eb
......@@ -2384,7 +2384,10 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
auto sk = mdgetskinmap(m, DETAILPAL, skinNum, surfi);
if (sk)
{
f = sk->param;
buildgl_bindSamplerObject(GL_TEXTURE3, (sk->flags & HICR_FORCEFILTER) ? (PTH_HIGHTILE | PTH_FORCEFILTER) : PTH_HIGHTILE);
}
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
......@@ -2397,9 +2400,13 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
if (i)
{
auto sk = mdgetskinmap(m, GLOWPAL, skinNum, surfi);
if (sk)
buildgl_bindSamplerObject(GL_TEXTURE4, (sk->flags& HICR_FORCEFILTER) ? (PTH_HIGHTILE | PTH_FORCEFILTER) : PTH_HIGHTILE);
polymost_useGlowMapping(true);
polymost_setupglowtexture(GL_TEXTURE4, i);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glTranslatef(xpanning, ypanning, 1.0f);
......
......@@ -3201,8 +3201,9 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32
detailpth->hicr && detailpth->hicr->palnum == DETAILPAL)
{
polymost_useDetailMapping(true);
polymost_setupdetailtexture(videoGetRenderMode() == REND_POLYMOST ? GL_TEXTURE3 : ++texunits, detailpth->glpic);
int const unit = videoGetRenderMode() == REND_POLYMOST ? GL_TEXTURE3 : ++texunits;
polymost_setupdetailtexture(unit, detailpth->glpic);
buildgl_bindSamplerObject(unit, detailpth->flags);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
......@@ -3227,7 +3228,9 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32
glowpth->hicr && (glowpth->hicr->palnum == GLOWPAL))
{
polymost_useGlowMapping(true);
polymost_setupglowtexture(videoGetRenderMode() == REND_POLYMOST ? GL_TEXTURE4 : ++texunits, glowpth->glpic);
int const unit = videoGetRenderMode() == REND_POLYMOST ? GL_TEXTURE4 : ++texunits;
polymost_setupglowtexture(unit, glowpth->glpic);
buildgl_bindSamplerObject(unit, glowpth->flags);
buildgl_activeTexture(GL_TEXTURE0);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment