Skip to content

Commit

Permalink
More Mesa fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed May 28, 2022
1 parent c412cd7 commit ff958a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public FixedFunctionWorldRenderingPipeline() {
BlockRenderingSettings.INSTANCE.setUseSeparateAo(false);
BlockRenderingSettings.INSTANCE.setAmbientOcclusionLevel(1.0f);
BlockRenderingSettings.INSTANCE.setUseExtendedVertexFormat(false);
BlockRenderingSettings.INSTANCE.setBlockTypeIds(null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.coderbot.iris.gl.IrisRenderSystem;
import net.coderbot.iris.gl.framebuffer.GlFramebuffer;
import net.coderbot.iris.gl.texture.DepthBufferFormat;
import net.minecraft.client.Minecraft;
import org.lwjgl.opengl.GL11C;
import org.lwjgl.opengl.GL13C;
import org.lwjgl.opengl.GL20C;
Expand All @@ -31,8 +32,9 @@ void resize(int width, int height, GlFramebuffer copyTexture, DepthBufferFormat
copyTexture.bindAsReadBuffer();
IrisRenderSystem.copyTexImage2D(GL20C.GL_TEXTURE_2D, 0, format.getGlInternalFormat(), 0, 0, width, height, 0);
} else {
GlStateManager._texImage2D(GL11C.GL_TEXTURE_2D, 0, format.getGlInternalFormat(), width, height, 0,
format.getGlType(), format.getGlFormat(), null);
// NB: This isn't correct, but it's much better than garbage data being written to shadowtex0.
Minecraft.getInstance().getMainRenderTarget().bindWrite(false);
IrisRenderSystem.copyTexImage2D(GL20C.GL_TEXTURE_2D, 0, format.getGlInternalFormat(), 0, 0, width, height, 0);
}

GlStateManager._bindTexture(0);
Expand Down

0 comments on commit ff958a8

Please sign in to comment.