MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / bindTexture

Method bindTexture

src/main/java/net/optifine/shaders/ShadersTex.java:237–263  ·  view source on GitHub ↗
(ITextureObject tex)

Source from the content-addressed store, hash-verified

235 }
236
237 public static void bindTexture(ITextureObject tex)
238 {
239 int i = tex.getGlTextureId();
240 bindTextures(tex.getMultiTexID());
241
242 if (GlStateManager.getActiveTextureUnit() == 33984)
243 {
244 int j = Shaders.atlasSizeX;
245 int k = Shaders.atlasSizeY;
246
247 if (tex instanceof TextureMap)
248 {
249 Shaders.atlasSizeX = ((TextureMap)tex).atlasWidth;
250 Shaders.atlasSizeY = ((TextureMap)tex).atlasHeight;
251 }
252 else
253 {
254 Shaders.atlasSizeX = 0;
255 Shaders.atlasSizeY = 0;
256 }
257
258 if (Shaders.atlasSizeX != j || Shaders.atlasSizeY != k)
259 {
260 Shaders.uniform_atlasSize.setValue(Shaders.atlasSizeX, Shaders.atlasSizeY);
261 }
262 }
263 }
264
265 public static void bindTextures(int baseTex)
266 {

Callers 15

beginLivingDamageMethod · 0.95
bindTextureMethod · 0.95
drawBackgroundMethod · 0.45
renderShadowMapMethod · 0.45
renderEndPortalMethod · 0.45
renderDeferredMethod · 0.45
drawButtonMethod · 0.45
mouseDraggedMethod · 0.45
mouseDraggedMethod · 0.45
drawImageMethod · 0.45
drawRenderItemPhysicsMethod · 0.45

Calls 5

bindTexturesMethod · 0.95
getActiveTextureUnitMethod · 0.95
getGlTextureIdMethod · 0.65
getMultiTexIDMethod · 0.65
setValueMethod · 0.45

Tested by

no test coverage detected