Custom images, textures, SSBO, and ShaderPack/ShaderProperties backports

This commit is contained in:
Jason Mitchell authored and Jason Mitchell committed 2026-01-22 16:32:15 -08:00
1 parent 6d60477b93
commit bb52476d27
54 files changed
+2210 -494

No files matched your search

@@ -1,16 +1,28 @@
package net.coderbot.iris.gl.sampler;
import com.gtnewhorizons.angelica.glsm.RenderSystem;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL43;
public class SamplerLimits {
private static SamplerLimits instance;
private final int maxTextureUnits;
private final int maxDrawBuffers;
private static SamplerLimits instance;
private final int maxShaderStorageUnits;
private SamplerLimits() {
this.maxTextureUnits = GL11.glGetInteger(GL20.GL_MAX_TEXTURE_IMAGE_UNITS);
this.maxDrawBuffers = GL11.glGetInteger(GL20.GL_MAX_DRAW_BUFFERS);
this.maxShaderStorageUnits = RenderSystem.supportsSSBO() ? GL11.glGetInteger(GL43.GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS) : 0;
}
public static SamplerLimits get() {
if (instance == null) {
instance = new SamplerLimits();
}
return instance;
}
public int getMaxTextureUnits() {
@@ -21,11 +33,7 @@ public class SamplerLimits {
return maxDrawBuffers;
}
public static SamplerLimits get() {
if (instance == null) {
instance = new SamplerLimits();
}
return instance;
public int getMaxShaderStorageUnits() {
return maxShaderStorageUnits;
}
}