mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 12:52:19 +00:00
Texture cache fixes (#1198)
This commit is contained in:
1 parent
89132f3ef9
commit
92b6dcc010
8 files changed
+615
-68
No files matched your search
@@ -72,7 +72,7 @@ public final class CommonUniforms {
|
||||
// TODO: OptiFine doesn't think that atlasSize is a "dynamic" uniform,
|
||||
// but we do. How will custom uniforms depending on atlasSize work?
|
||||
uniforms.uniform2i("atlasSize", () -> {
|
||||
final int glId = GLStateManager.getBoundTexture();
|
||||
final int glId = GLStateManager.getBoundTextureForServerState();
|
||||
|
||||
final AbstractTexture texture = TextureTracker.INSTANCE.getTexture(glId);
|
||||
if (texture instanceof TextureMap) {
|
||||
@@ -84,7 +84,7 @@ public final class CommonUniforms {
|
||||
}, StateUpdateNotifiers.bindTextureNotifier);
|
||||
|
||||
uniforms.uniform2i("gtextureSize", () -> {
|
||||
final int glId = GLStateManager.getBoundTexture();
|
||||
final int glId = GLStateManager.getBoundTextureForServerState();
|
||||
|
||||
final TextureInfo info = TextureInfoCache.INSTANCE.getInfo(glId);
|
||||
return new Vector2i(info.getWidth(), info.getHeight());
|
||||
|
||||
Reference in new issue
Block a user