mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-20 12:29:40 +00:00
Use GTNHLib MemoryUtils instead of the builtin compat ones (#853)
This commit is contained in:
1 parent
9029182353
commit
7e2399714c
33 files changed
+256
-1011
No files matched your search
@@ -1,6 +1,8 @@
|
||||
package net.coderbot.iris.gl.framebuffer;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.lwjgl.MemoryStack;
|
||||
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack.*;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack;
|
||||
import com.gtnewhorizons.angelica.glsm.RenderSystem;
|
||||
import com.gtnewhorizons.angelica.glsm.texture.TextureInfoCache;
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntArrayMap;
|
||||
@@ -51,7 +53,7 @@ public class GlFramebuffer extends GlResource {
|
||||
}
|
||||
|
||||
public void noDrawBuffers() {
|
||||
try (MemoryStack stack = MemoryStack.stackPush()) {
|
||||
try (MemoryStack stack = stackPush()) {
|
||||
final IntBuffer buffer = stack.mallocInt(1);
|
||||
buffer.put(GL11.GL_NONE);
|
||||
RenderSystem.drawBuffers(getGlId(), buffer);
|
||||
@@ -59,7 +61,7 @@ public class GlFramebuffer extends GlResource {
|
||||
}
|
||||
|
||||
public void drawBuffers(int[] buffers) {
|
||||
try (MemoryStack stack = MemoryStack.stackPush()) {
|
||||
try (MemoryStack stack = stackPush()) {
|
||||
final IntBuffer glBuffers = stack.mallocInt(buffers.length);
|
||||
int index = 0;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.coderbot.iris.rendertarget;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.lwjgl.MemoryStack;
|
||||
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack.*;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack;
|
||||
import com.gtnewhorizons.angelica.glsm.GLStateManager;
|
||||
import com.gtnewhorizons.angelica.glsm.RenderSystem;
|
||||
import lombok.Getter;
|
||||
@@ -41,7 +43,7 @@ public class RenderTarget {
|
||||
this.width = builder.width;
|
||||
this.height = builder.height;
|
||||
|
||||
try (MemoryStack stack = MemoryStack.stackPush()) {
|
||||
try (MemoryStack stack = stackPush()) {
|
||||
IntBuffer textures = stack.mallocInt(2);
|
||||
GL11.glGenTextures(textures);
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.coderbot.iris.sodium.shader_overrides;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.lwjgl.MemoryStack;
|
||||
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack.*;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack;
|
||||
import com.gtnewhorizons.angelica.compat.toremove.MatrixStack;
|
||||
import com.gtnewhorizons.angelica.glsm.RenderSystem;
|
||||
import java.nio.FloatBuffer;
|
||||
@@ -86,7 +88,7 @@ public class IrisChunkProgram extends ChunkProgram {
|
||||
return;
|
||||
}
|
||||
|
||||
try (MemoryStack stack = MemoryStack.stackPush()) {
|
||||
try (MemoryStack stack = stackPush()) {
|
||||
FloatBuffer buffer = stack.mallocFloat(16);
|
||||
|
||||
matrix.get(buffer);
|
||||
|
||||
+14
-13
@@ -1,6 +1,7 @@
|
||||
package net.coderbot.iris.sodium.vertex_format.entity_xhfp;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.lwjgl.CompatMemoryUtil;
|
||||
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryUtilities.*;
|
||||
|
||||
import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView;
|
||||
import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferWriterUnsafe;
|
||||
import me.jellysquid.mods.sodium.client.model.vertex.formats.glyph.GlyphVertexSink;
|
||||
@@ -32,14 +33,14 @@ public class EntityVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe imp
|
||||
uSum += u;
|
||||
vSum += v;
|
||||
|
||||
CompatMemoryUtil.memPutFloat(i, x);
|
||||
CompatMemoryUtil.memPutFloat(i + 4, y);
|
||||
CompatMemoryUtil.memPutFloat(i + 8, z);
|
||||
CompatMemoryUtil.memPutInt(i + 12, color);
|
||||
CompatMemoryUtil.memPutFloat(i + 16, u);
|
||||
CompatMemoryUtil.memPutFloat(i + 20, v);
|
||||
CompatMemoryUtil.memPutInt(i + 24, overlay);
|
||||
CompatMemoryUtil.memPutInt(i + 28, light);
|
||||
memPutFloat(i, x);
|
||||
memPutFloat(i + 4, y);
|
||||
memPutFloat(i + 8, z);
|
||||
memPutInt(i + 12, color);
|
||||
memPutFloat(i + 16, u);
|
||||
memPutFloat(i + 20, v);
|
||||
memPutInt(i + 24, overlay);
|
||||
memPutInt(i + 28, light);
|
||||
|
||||
if (vertexCount == 4) {
|
||||
this.endQuad(normal);
|
||||
@@ -80,10 +81,10 @@ public class EntityVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe imp
|
||||
int tangent = NormalHelper.computeTangent(normalX, normalY, normalZ, quad);
|
||||
|
||||
for (long vertex = 0; vertex < 4; vertex++) {
|
||||
CompatMemoryUtil.memPutFloat(i + 36 - STRIDE * vertex, uSum);
|
||||
CompatMemoryUtil.memPutFloat(i + 40 - STRIDE * vertex, vSum);
|
||||
CompatMemoryUtil.memPutInt(i + 32 - STRIDE * vertex, normal);
|
||||
CompatMemoryUtil.memPutInt(i + 44 - STRIDE * vertex, tangent);
|
||||
memPutFloat(i + 36 - STRIDE * vertex, uSum);
|
||||
memPutFloat(i + 40 - STRIDE * vertex, vSum);
|
||||
memPutInt(i + 32 - STRIDE * vertex, normal);
|
||||
memPutInt(i + 44 - STRIDE * vertex, tangent);
|
||||
}
|
||||
|
||||
uSum = 0;
|
||||
|
||||
+13
-12
@@ -1,6 +1,7 @@
|
||||
package net.coderbot.iris.sodium.vertex_format.entity_xhfp;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.lwjgl.CompatMemoryUtil;
|
||||
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryUtilities.*;
|
||||
|
||||
import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView;
|
||||
import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferWriterUnsafe;
|
||||
import me.jellysquid.mods.sodium.client.model.vertex.formats.glyph.GlyphVertexSink;
|
||||
@@ -32,13 +33,13 @@ public class GlyphVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe impl
|
||||
uSum += u;
|
||||
vSum += v;
|
||||
|
||||
CompatMemoryUtil.memPutFloat(i, x);
|
||||
CompatMemoryUtil.memPutFloat(i + 4, y);
|
||||
CompatMemoryUtil.memPutFloat(i + 8, z);
|
||||
CompatMemoryUtil.memPutInt(i + 12, color);
|
||||
CompatMemoryUtil.memPutFloat(i + 16, u);
|
||||
CompatMemoryUtil.memPutFloat(i + 20, v);
|
||||
CompatMemoryUtil.memPutInt(i + 24, light);
|
||||
memPutFloat(i, x);
|
||||
memPutFloat(i + 4, y);
|
||||
memPutFloat(i + 8, z);
|
||||
memPutInt(i + 12, color);
|
||||
memPutFloat(i + 16, u);
|
||||
memPutFloat(i + 20, v);
|
||||
memPutInt(i + 24, light);
|
||||
|
||||
if (vertexCount == 4) {
|
||||
this.endQuad(normal);
|
||||
@@ -79,10 +80,10 @@ public class GlyphVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe impl
|
||||
int tangent = NormalHelper.computeTangent(normalX, normalY, normalZ, quad);
|
||||
|
||||
for (long vertex = 0; vertex < 4; vertex++) {
|
||||
CompatMemoryUtil.memPutFloat(i + 36 - STRIDE * vertex, uSum);
|
||||
CompatMemoryUtil.memPutFloat(i + 40 - STRIDE * vertex, vSum);
|
||||
CompatMemoryUtil.memPutInt(i + 28 - STRIDE * vertex, normal);
|
||||
CompatMemoryUtil.memPutInt(i + 44 - STRIDE * vertex, tangent);
|
||||
memPutFloat(i + 36 - STRIDE * vertex, uSum);
|
||||
memPutFloat(i + 40 - STRIDE * vertex, vSum);
|
||||
memPutInt(i + 28 - STRIDE * vertex, normal);
|
||||
memPutInt(i + 44 - STRIDE * vertex, tangent);
|
||||
}
|
||||
|
||||
uSum = 0;
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
package net.coderbot.iris.sodium.vertex_format.entity_xhfp;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.lwjgl.CompatMemoryUtil;
|
||||
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryUtilities.*;
|
||||
|
||||
import net.coderbot.iris.vertices.IrisQuadView;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
@@ -44,7 +45,7 @@ public abstract class QuadViewEntity implements IrisQuadView {
|
||||
|
||||
@Override
|
||||
float getFloat(long writePointer) {
|
||||
return CompatMemoryUtil.memGetFloat(writePointer);
|
||||
return memGetFloat(writePointer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
package net.coderbot.iris.sodium.vertex_format.terrain_xhfp;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.lwjgl.CompatMemoryUtil;
|
||||
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryUtilities.*;
|
||||
|
||||
import net.coderbot.iris.vertices.IrisQuadView;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
@@ -52,7 +53,7 @@ public abstract class QuadViewTerrain implements IrisQuadView {
|
||||
|
||||
@Override
|
||||
short getShort(long writePointer) {
|
||||
return CompatMemoryUtil.memGetShort(writePointer);
|
||||
return memGetShort(writePointer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+29
-28
@@ -1,6 +1,7 @@
|
||||
package net.coderbot.iris.sodium.vertex_format.terrain_xhfp;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.lwjgl.CompatMemoryUtil;
|
||||
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryUtilities.*;
|
||||
|
||||
import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferView;
|
||||
import me.jellysquid.mods.sodium.client.model.vertex.buffer.VertexBufferWriterUnsafe;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.format.ModelVertexSink;
|
||||
@@ -54,21 +55,21 @@ public class XHFPModelVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe
|
||||
vertexCount++;
|
||||
// NB: uSum and vSum must already be incremented outside of this function.
|
||||
|
||||
CompatMemoryUtil.memPutShort(i, x);
|
||||
CompatMemoryUtil.memPutShort(i + 2, y);
|
||||
CompatMemoryUtil.memPutShort(i + 4, z);
|
||||
CompatMemoryUtil.memPutInt(i + 8, color);
|
||||
CompatMemoryUtil.memPutShort(i + 12, u);
|
||||
CompatMemoryUtil.memPutShort(i + 14, v);
|
||||
CompatMemoryUtil.memPutShort(i + 16, (short) (light & 0xFFFF));
|
||||
CompatMemoryUtil.memPutShort(i + 18, (short) (light >> 16 & 0xFFFF));
|
||||
memPutShort(i, x);
|
||||
memPutShort(i + 2, y);
|
||||
memPutShort(i + 4, z);
|
||||
memPutInt(i + 8, color);
|
||||
memPutShort(i + 12, u);
|
||||
memPutShort(i + 14, v);
|
||||
memPutShort(i + 16, (short) (light & 0xFFFF));
|
||||
memPutShort(i + 18, (short) (light >> 16 & 0xFFFF));
|
||||
// NB: We don't set midTexCoord, normal, and tangent here, they will be filled in later.
|
||||
// block ID: We only set the first 2 values, any legacy shaders using z or w will get filled in based on the GLSL spec
|
||||
// https://www.khronos.org/opengl/wiki/Vertex_Specification#Vertex_format
|
||||
// TODO: can we pack this into one short?
|
||||
CompatMemoryUtil.memPutShort(i + 36, materialId);
|
||||
CompatMemoryUtil.memPutShort(i + 38, renderType);
|
||||
CompatMemoryUtil.memPutInt(i + 40, packedMidBlock);
|
||||
memPutShort(i + 36, materialId);
|
||||
memPutShort(i + 38, renderType);
|
||||
memPutInt(i + 40, packedMidBlock);
|
||||
|
||||
if (vertexCount == 4) {
|
||||
vertexCount = 0;
|
||||
@@ -103,15 +104,15 @@ public class XHFPModelVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe
|
||||
uSum *= 0.25f;
|
||||
vSum *= 0.25f;
|
||||
|
||||
CompatMemoryUtil.memPutFloat(i + 20, uSum);
|
||||
CompatMemoryUtil.memPutFloat(i + 20 - STRIDE, uSum);
|
||||
CompatMemoryUtil.memPutFloat(i + 20 - STRIDE * 2, uSum);
|
||||
CompatMemoryUtil.memPutFloat(i + 20 - STRIDE * 3, uSum);
|
||||
memPutFloat(i + 20, uSum);
|
||||
memPutFloat(i + 20 - STRIDE, uSum);
|
||||
memPutFloat(i + 20 - STRIDE * 2, uSum);
|
||||
memPutFloat(i + 20 - STRIDE * 3, uSum);
|
||||
|
||||
CompatMemoryUtil.memPutFloat(i + 24, vSum);
|
||||
CompatMemoryUtil.memPutFloat(i + 24 - STRIDE, vSum);
|
||||
CompatMemoryUtil.memPutFloat(i + 24 - STRIDE * 2, vSum);
|
||||
CompatMemoryUtil.memPutFloat(i + 24 - STRIDE * 3, vSum);
|
||||
memPutFloat(i + 24, vSum);
|
||||
memPutFloat(i + 24 - STRIDE, vSum);
|
||||
memPutFloat(i + 24 - STRIDE * 2, vSum);
|
||||
memPutFloat(i + 24 - STRIDE * 3, vSum);
|
||||
|
||||
uSum = 0;
|
||||
vSum = 0;
|
||||
@@ -124,17 +125,17 @@ public class XHFPModelVertexBufferWriterUnsafe extends VertexBufferWriterUnsafe
|
||||
NormalHelper.computeFaceNormal(normal, quad);
|
||||
int packedNormal = NormalHelper.packNormal(normal, 0.0f);
|
||||
|
||||
CompatMemoryUtil.memPutInt(i + 32, packedNormal);
|
||||
CompatMemoryUtil.memPutInt(i + 32 - STRIDE, packedNormal);
|
||||
CompatMemoryUtil.memPutInt(i + 32 - STRIDE * 2, packedNormal);
|
||||
CompatMemoryUtil.memPutInt(i + 32 - STRIDE * 3, packedNormal);
|
||||
memPutInt(i + 32, packedNormal);
|
||||
memPutInt(i + 32 - STRIDE, packedNormal);
|
||||
memPutInt(i + 32 - STRIDE * 2, packedNormal);
|
||||
memPutInt(i + 32 - STRIDE * 3, packedNormal);
|
||||
|
||||
int tangent = NormalHelper.computeTangent(normal.x, normal.y, normal.z, quad);
|
||||
|
||||
CompatMemoryUtil.memPutInt(i + 28, tangent);
|
||||
CompatMemoryUtil.memPutInt(i + 28 - STRIDE, tangent);
|
||||
CompatMemoryUtil.memPutInt(i + 28 - STRIDE * 2, tangent);
|
||||
CompatMemoryUtil.memPutInt(i + 28 - STRIDE * 3, tangent);
|
||||
memPutInt(i + 28, tangent);
|
||||
memPutInt(i + 28 - STRIDE, tangent);
|
||||
memPutInt(i + 28 - STRIDE * 2, tangent);
|
||||
memPutInt(i + 28 - STRIDE * 3, tangent);
|
||||
}
|
||||
|
||||
this.advance();
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package net.coderbot.iris.texture.util;
|
||||
|
||||
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack.*;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack;
|
||||
import com.gtnewhorizons.angelica.glsm.GLStateManager;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
@@ -14,43 +17,60 @@ public class TextureManipulationUtil {
|
||||
private static int colorFillFBO = -1;
|
||||
|
||||
public static void fillWithColor(int textureId, int maxLevel, int rgba) {
|
||||
if (colorFillFBO == -1) {
|
||||
colorFillFBO = OpenGlHelper.func_153165_e/*glGenFramebuffers*/();
|
||||
}
|
||||
|
||||
final int previousFramebufferId = GL11.glGetInteger(GL30.GL_FRAMEBUFFER_BINDING);
|
||||
// TODO: allocations
|
||||
final FloatBuffer previousClearColorBuffer = BufferUtils.createFloatBuffer(4);
|
||||
GL11.glGetFloat(GL11.GL_COLOR_CLEAR_VALUE, previousClearColorBuffer);
|
||||
final int previousTextureId = GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D);
|
||||
final IntBuffer previousViewportBuffer = BufferUtils.createIntBuffer(4);
|
||||
GL11.glGetInteger(GL11.GL_VIEWPORT, previousViewportBuffer);
|
||||
|
||||
OpenGlHelper.func_153171_g/*glBindFramebuffer*/(GL30.GL_FRAMEBUFFER, colorFillFBO);
|
||||
GL11.glClearColor(
|
||||
(rgba >> 24 & 0xFF) / 255.0f,
|
||||
(rgba >> 16 & 0xFF) / 255.0f,
|
||||
(rgba >> 8 & 0xFF) / 255.0f,
|
||||
(rgba & 0xFF) / 255.0f
|
||||
);
|
||||
GLStateManager.glBindTexture(GL11.GL_TEXTURE_2D, textureId);
|
||||
for (int level = 0; level <= maxLevel; ++level) {
|
||||
final int width = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, level, GL11.GL_TEXTURE_WIDTH);
|
||||
final int height = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, level, GL11.GL_TEXTURE_HEIGHT);
|
||||
GL11.glViewport(0, 0, width, height);
|
||||
GL30.glFramebufferTexture2D(GL30.GL_FRAMEBUFFER, GL30.GL_COLOR_ATTACHMENT0, GL11.GL_TEXTURE_2D, textureId, level);
|
||||
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
|
||||
if (Minecraft.isRunningOnMac) {
|
||||
GL11.glGetError();
|
||||
try(final MemoryStack stack = stackPush()) {
|
||||
if (colorFillFBO == -1) {
|
||||
colorFillFBO = OpenGlHelper.func_153165_e/*glGenFramebuffers*/();
|
||||
}
|
||||
|
||||
final int previousFramebufferId = GL11.glGetInteger(GL30.GL_FRAMEBUFFER_BINDING);
|
||||
final FloatBuffer previousClearColorBuffer = stack.mallocFloat(4);
|
||||
GL11.glGetFloat(GL11.GL_COLOR_CLEAR_VALUE, previousClearColorBuffer);
|
||||
final int previousTextureId = GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D);
|
||||
final IntBuffer previousViewportBuffer = stack.mallocInt(4);
|
||||
GL11.glGetInteger(GL11.GL_VIEWPORT, previousViewportBuffer);
|
||||
|
||||
GL30.glFramebufferTexture2D(GL30.GL_FRAMEBUFFER, GL30.GL_COLOR_ATTACHMENT0, GL11.GL_TEXTURE_2D, 0, level);
|
||||
}
|
||||
OpenGlHelper.func_153171_g/*glBindFramebuffer*/(GL30.GL_FRAMEBUFFER, colorFillFBO);
|
||||
GL11.glClearColor(
|
||||
(rgba >> 24 & 0xFF) / 255.0f,
|
||||
(rgba >> 16 & 0xFF) / 255.0f,
|
||||
(rgba >> 8 & 0xFF) / 255.0f,
|
||||
(rgba & 0xFF) / 255.0f);
|
||||
GLStateManager.glBindTexture(GL11.GL_TEXTURE_2D, textureId);
|
||||
for (int level = 0; level <= maxLevel; ++level) {
|
||||
final int width = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, level, GL11.GL_TEXTURE_WIDTH);
|
||||
final int height = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, level, GL11.GL_TEXTURE_HEIGHT);
|
||||
GL11.glViewport(0, 0, width, height);
|
||||
GL30.glFramebufferTexture2D(
|
||||
GL30.GL_FRAMEBUFFER,
|
||||
GL30.GL_COLOR_ATTACHMENT0,
|
||||
GL11.GL_TEXTURE_2D,
|
||||
textureId,
|
||||
level);
|
||||
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
|
||||
if (Minecraft.isRunningOnMac) {
|
||||
GL11.glGetError();
|
||||
}
|
||||
|
||||
OpenGlHelper.func_153171_g/*glBindFramebuffer*/(GL30.GL_FRAMEBUFFER, previousFramebufferId);
|
||||
GL11.glClearColor(previousClearColorBuffer.get(0), previousClearColorBuffer.get(1), previousClearColorBuffer.get(2), previousClearColorBuffer.get(3));
|
||||
GLStateManager.glBindTexture(GL11.GL_TEXTURE_2D, previousTextureId);
|
||||
GL11.glViewport(previousViewportBuffer.get(0), previousViewportBuffer.get(1), previousViewportBuffer.get(2), previousViewportBuffer.get(3));
|
||||
GL30.glFramebufferTexture2D(
|
||||
GL30.GL_FRAMEBUFFER,
|
||||
GL30.GL_COLOR_ATTACHMENT0,
|
||||
GL11.GL_TEXTURE_2D,
|
||||
0,
|
||||
level);
|
||||
}
|
||||
|
||||
OpenGlHelper.func_153171_g/*glBindFramebuffer*/(GL30.GL_FRAMEBUFFER, previousFramebufferId);
|
||||
GL11.glClearColor(
|
||||
previousClearColorBuffer.get(0),
|
||||
previousClearColorBuffer.get(1),
|
||||
previousClearColorBuffer.get(2),
|
||||
previousClearColorBuffer.get(3));
|
||||
GLStateManager.glBindTexture(GL11.GL_TEXTURE_2D, previousTextureId);
|
||||
GL11.glViewport(
|
||||
previousViewportBuffer.get(0),
|
||||
previousViewportBuffer.get(1),
|
||||
previousViewportBuffer.get(2),
|
||||
previousViewportBuffer.get(3));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user