mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-20 12:29:40 +00:00
More Caching (#242)
* More Caching * Pull TextureTracker & TextureInfoCache out of Iris and into GLSM * Cache more TextureInfo state * GLSM: glTexParameter, glGetTexParameter(i|f), glGetTexLevelParameteri * Move IrisRenderSystem -> GLSM.RenderSystem * Ensure DSA works properly with GLSM * Further updates to DSA for texParameter/getTexParameter * A few more cached fields for TextureInfo * Properly handle deleteTextures * Ensure anyone crazy enough to use an Int/FloatBuffer for single value params get redirected * Add optional runtime disabling of GLSM * Switch checkGLError from an inject to a redirect, hopefully fewer allocations * Fewer allocations for clearBufferState * Microoptimization for (setup|clear)BufferState
This commit is contained in:
1 parent
b956a44857
commit
6691511e17
68 files changed
+935
-890
No files matched your search
@@ -2,8 +2,8 @@ package net.coderbot.iris.rendertarget;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.gtnewhorizons.angelica.glsm.GLStateManager;
|
||||
import com.gtnewhorizons.angelica.glsm.RenderSystem;
|
||||
import lombok.Getter;
|
||||
import net.coderbot.iris.gl.IrisRenderSystem;
|
||||
import net.coderbot.iris.gl.framebuffer.GlFramebuffer;
|
||||
import net.coderbot.iris.gl.texture.DepthBufferFormat;
|
||||
import net.coderbot.iris.gl.texture.DepthCopyStrategy;
|
||||
@@ -177,7 +177,7 @@ public class RenderTargets {
|
||||
translucentDepthDirty = false;
|
||||
GLStateManager.glBindTexture(GL11.GL_TEXTURE_2D, noTranslucents.getTextureId());
|
||||
depthSourceFb.bindAsReadBuffer();
|
||||
IrisRenderSystem.copyTexImage2D(GL11.GL_TEXTURE_2D, 0, currentDepthFormat.getGlInternalFormat(), 0, 0, cachedWidth, cachedHeight, 0);
|
||||
RenderSystem.copyTexImage2D(GL11.GL_TEXTURE_2D, 0, currentDepthFormat.getGlInternalFormat(), 0, 0, cachedWidth, cachedHeight, 0);
|
||||
} else {
|
||||
copyStrategy.copy(depthSourceFb, getDepthTexture(), noTranslucentsDestFb, noTranslucents.getTextureId(), getCurrentWidth(), getCurrentHeight());
|
||||
}
|
||||
@@ -188,7 +188,7 @@ public class RenderTargets {
|
||||
handDepthDirty = false;
|
||||
GLStateManager.glBindTexture(GL11.GL_TEXTURE_2D, noHand.getTextureId());
|
||||
depthSourceFb.bindAsReadBuffer();
|
||||
IrisRenderSystem.copyTexImage2D(GL11.GL_TEXTURE_2D, 0, currentDepthFormat.getGlInternalFormat(), 0, 0, cachedWidth, cachedHeight, 0);
|
||||
RenderSystem.copyTexImage2D(GL11.GL_TEXTURE_2D, 0, currentDepthFormat.getGlInternalFormat(), 0, 0, cachedWidth, cachedHeight, 0);
|
||||
} else {
|
||||
copyStrategy.copy(depthSourceFb, getDepthTexture(), noHandDestFb, noHand.getTextureId(), getCurrentWidth(), getCurrentHeight());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user