summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.h
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2021-10-22 15:15:07 -0700
committerPtolemy <ptolemy@lindenlab.com>2021-10-22 15:15:07 -0700
commit2c2f6f2a9b867552460a9c2e52b9d9dab0b73b14 (patch)
treee682c2a2f74325bc58a95b320e65a92a8959223e /indra/llrender/llrender.h
parent26e8d2d8c7328878cb6bc83eb6b3b7b5b1462f17 (diff)
parent3efd4c50a031ce0c1cb3d2fcc43e403136277e1f (diff)
Merge branch 'DRTVWR-546' into SL-16127
Diffstat (limited to 'indra/llrender/llrender.h')
-rw-r--r--indra/llrender/llrender.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index c08c2d6881..7f19a45410 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -158,9 +158,20 @@ public:
// Binds the LLImageGL to this texture unit
// (automatically enables the unit for the LLImageGL's texture type)
- bool bind(LLImageGL* texture, bool for_rendering = false, bool forceBind = false);
+ bool bind(LLImageGL* texture, bool for_rendering = false, bool forceBind = false, S32 usename = 0);
bool bind(LLTexture* texture, bool for_rendering = false, bool forceBind = false);
+ // bind implementation for inner loops
+ // makes the following assumptions:
+ // - No need for gGL.flush()
+ // - texture is not null
+ // - gl_tex->getTexName() is not zero
+ // - This texture is not being bound redundantly
+ // - USE_SRGB_DECODE is disabled
+ // - mTexOptionsDirty is false
+ // -
+ void bindFast(LLTexture* texture);
+
// Binds a cubemap to this texture unit
// (automatically enables the texture unit for cubemaps)
bool bind(LLCubeMap* cubeMap);
@@ -177,6 +188,9 @@ public:
// (only if there's a texture of the given type currently bound)
void unbind(eTextureType type);
+ // Fast but unsafe version of unbind
+ void unbindFast(eTextureType type);
+
// Sets the addressing mode used to sample the texture
// Warning: this stays set for the bound texture forever,
// make sure you want to permanently change the address mode for the bound texture.