mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 12:52:19 +00:00
OpenGL Debugging
* Move GLDebug and gl capabilitiesinto angelica/glsm instead of Iris * Wire up GLDebug.pushGroup && popGroup via mixins if lwjgl debug is enabled (useful for api trace)
This commit is contained in:
1 parent
3b61bb74a2
commit
3ee82e7157
14 files changed
+154
-150
No files matched your search
@@ -2,7 +2,6 @@ package net.coderbot.iris.postprocess;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.gtnewhorizons.angelica.glsm.GLStateManager;
|
||||
import net.coderbot.iris.Iris;
|
||||
import net.coderbot.iris.gl.IrisRenderSystem;
|
||||
import net.coderbot.iris.gl.framebuffer.GlFramebuffer;
|
||||
import net.coderbot.iris.gl.program.Program;
|
||||
@@ -40,7 +39,7 @@ public class CenterDepthSampler {
|
||||
this.framebuffer = new GlFramebuffer();
|
||||
|
||||
// Fall back to a less precise format if the system doesn't support OpenGL 3
|
||||
InternalTextureFormat format = Iris.capabilities.OpenGL32 ? InternalTextureFormat.R32F : InternalTextureFormat.RGB16;
|
||||
InternalTextureFormat format = GLStateManager.capabilities.OpenGL32 ? InternalTextureFormat.R32F : InternalTextureFormat.RGB16;
|
||||
setupColorTexture(texture, format);
|
||||
setupColorTexture(altTexture, format);
|
||||
GLStateManager.glBindTexture(GL11.GL_TEXTURE_2D, 0);
|
||||
@@ -51,7 +50,7 @@ public class CenterDepthSampler {
|
||||
try {
|
||||
String fsh = new String(IOUtils.toByteArray(Objects.requireNonNull(getClass().getResourceAsStream("/centerDepth.fsh"))), StandardCharsets.UTF_8);
|
||||
|
||||
if (Iris.capabilities.OpenGL32) {
|
||||
if (GLStateManager.capabilities.OpenGL32) {
|
||||
fsh = fsh.replace("VERSIONPLACEHOLDER", "150 compatibility");
|
||||
} else {
|
||||
fsh = fsh.replace("#define IS_GL3", "");
|
||||
|
||||
Reference in new issue
Block a user