mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Change texturebinding to use the textureId directly rather than iconIndex
to determine if it needs to rebind the texture sheet
This commit is contained in:
1 parent
f348496c10
commit
fde94144ec
2 files changed
+10
-9
No files matched your search
@@ -159,15 +159,11 @@ public class TextureFXManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
int old = GL11.glGetInteger(GL_TEXTURE_BINDING_2D);
|
int old = GL11.glGetInteger(GL_TEXTURE_BINDING_2D);
|
||||||
|
|
||||||
effect.func_76845_a(client.field_71446_o);
|
effect.func_76845_a(client.field_71446_o);
|
||||||
|
|
||||||
id = GL11.glGetInteger(GL_TEXTURE_BINDING_2D);
|
id = GL11.glGetInteger(GL_TEXTURE_BINDING_2D);
|
||||||
|
|
||||||
GL11.glBindTexture(GL_TEXTURE_2D, old);
|
GL11.glBindTexture(GL_TEXTURE_2D, old);
|
||||||
|
|
||||||
effectTextures.put(effect, id);
|
effectTextures.put(effect, id);
|
||||||
|
effect.field_76848_d = id;
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
this.field_78367_h.add(p_78355_1_);
|
this.field_78367_h.add(p_78355_1_);
|
||||||
p_78355_1_.func_76846_a();
|
p_78355_1_.func_76846_a();
|
||||||
}
|
}
|
||||||
@@ -417,16 +428,30 @@
|
@@ -417,28 +428,44 @@
|
||||||
{
|
{
|
||||||
TextureFX var3 = (TextureFX)this.field_78367_h.get(var2);
|
TextureFX var3 = (TextureFX)this.field_78367_h.get(var2);
|
||||||
var3.field_76851_c = this.field_78365_j.field_74337_g;
|
var3.field_76851_c = this.field_78365_j.field_74337_g;
|
||||||
@@ -77,6 +77,8 @@
|
|||||||
- this.field_78358_g.clear();
|
- this.field_78358_g.clear();
|
||||||
- this.field_78358_g.put(p_82772_1_.field_76852_a);
|
- this.field_78358_g.put(p_82772_1_.field_76852_a);
|
||||||
- this.field_78358_g.position(0).limit(p_82772_1_.field_76852_a.length);
|
- this.field_78358_g.position(0).limit(p_82772_1_.field_76852_a.length);
|
||||||
|
-
|
||||||
|
- if (p_82772_1_.field_76850_b != p_82772_2_)
|
||||||
+ Dimension dim = TextureFXManager.instance().getTextureDimensions(p_82772_1_);
|
+ Dimension dim = TextureFXManager.instance().getTextureDimensions(p_82772_1_);
|
||||||
+ int tWidth = dim.width >> 4;
|
+ int tWidth = dim.width >> 4;
|
||||||
+ int tHeight = dim.height >> 4;
|
+ int tHeight = dim.height >> 4;
|
||||||
@@ -92,10 +94,13 @@
|
|||||||
+ {
|
+ {
|
||||||
+ TextureFXManager.instance().scaleTextureFXData(p_82772_1_.field_76852_a, field_78358_g, tWidth, tLen);
|
+ TextureFXManager.instance().scaleTextureFXData(p_82772_1_.field_76852_a, field_78358_g, tWidth, tLen);
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
if (p_82772_1_.field_76850_b != p_82772_2_)
|
+ if (p_82772_1_.field_76848_d != p_82772_2_)
|
||||||
{
|
{
|
||||||
@@ -436,9 +461,11 @@
|
p_82772_1_.func_76845_a(this);
|
||||||
|
- p_82772_2_ = p_82772_1_.field_76850_b;
|
||||||
|
+ p_82772_2_ = p_82772_1_.field_76848_d;
|
||||||
|
}
|
||||||
|
|
||||||
for (int var3 = 0; var3 < p_82772_1_.field_76849_e; ++var3)
|
for (int var3 = 0; var3 < p_82772_1_.field_76849_e; ++var3)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user