inline OpenGL constants to lwjgl GLxx
This commit is contained in:
parent
a891ab4d3a
commit
783adb350b
20 changed files with 183 additions and 495 deletions
|
@ -40,6 +40,9 @@ import java.util.function.Function;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.util.concurrent.Futures;
|
import com.google.common.util.concurrent.Futures;
|
||||||
|
@ -480,8 +483,8 @@ public class Game implements IThreadListener {
|
||||||
this.textureMap = new TextureMap();
|
this.textureMap = new TextureMap();
|
||||||
this.textureManager.loadTexture(TextureMap.locationBlocksTexture, this.textureMap);
|
this.textureManager.loadTexture(TextureMap.locationBlocksTexture, this.textureMap);
|
||||||
this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_MIN_FILTER, WCF.GL_NEAREST);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_MAG_FILTER, WCF.GL_NEAREST);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||||
this.modelManager = new ModelManager(this.textureMap);
|
this.modelManager = new ModelManager(this.textureMap);
|
||||||
this.modelManager.onReload();
|
this.modelManager.onReload();
|
||||||
this.renderItem = new RenderItem(this.textureManager, this.modelManager);
|
this.renderItem = new RenderItem(this.textureManager, this.modelManager);
|
||||||
|
@ -695,10 +698,10 @@ public class Game implements IThreadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void render() {
|
public void render() {
|
||||||
GlState.tryBlendFuncSeparate(WCF.GL_SRC_ALPHA, WCF.GL_ONE_MINUS_SRC_ALPHA, WCF.GL_SRC_ALPHA, WCF.GL_ONE_MINUS_SRC_ALPHA);
|
GlState.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
GlState.enableDepth();
|
GlState.enableDepth();
|
||||||
GlState.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
GlState.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
WCF.glClear(WCF.GL_COLOR_BUFFER_BIT | WCF.GL_DEPTH_BUFFER_BIT);
|
WCF.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
|
||||||
if(this.wireframe) {
|
if(this.wireframe) {
|
||||||
WCF.glLineWidth(1.0f);
|
WCF.glLineWidth(1.0f);
|
||||||
WCF.glPolygonMode(true); // GL_FRONT_AND_BACK, GL_LINE
|
WCF.glPolygonMode(true); // GL_FRONT_AND_BACK, GL_LINE
|
||||||
|
@ -884,7 +887,7 @@ public class Game implements IThreadListener {
|
||||||
// jsys.tooltip[0] = 0;
|
// jsys.tooltip[0] = 0;
|
||||||
// this.tooltip = null;
|
// this.tooltip = null;
|
||||||
// GlState.resetTextures();
|
// GlState.resetTextures();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
GlState.enableTexture2D();
|
GlState.enableTexture2D();
|
||||||
// GlState.disableDepth();
|
// GlState.disableDepth();
|
||||||
if(this.open == null && this.getRenderViewEntity() != null && this.getRenderViewEntity().isPlayer()) {
|
if(this.open == null && this.getRenderViewEntity() != null && this.getRenderViewEntity().isPlayer()) {
|
||||||
|
@ -977,8 +980,8 @@ public class Game implements IThreadListener {
|
||||||
"Tickrate: %s%.2f" + TextColor.RESET + " %s [" + TextColor.GREEN + "%.1f" + TextColor.RESET + "], %.3f ms, E %d ms" +
|
"Tickrate: %s%.2f" + TextColor.RESET + " %s [" + TextColor.GREEN + "%.1f" + TextColor.RESET + "], %.3f ms, E %d ms" +
|
||||||
"%s%s"
|
"%s%s"
|
||||||
,
|
,
|
||||||
WCF.glGetString(WCF.GL_VERSION), // WCF.glGetString(WCF.GL_SHADING_LANGUAGE_VERSION),
|
WCF.glGetString(GL11.GL_VERSION), // WCF.glGetString(WCF.GL_SHADING_LANGUAGE_VERSION),
|
||||||
WCF.glGetString(WCF.GL_RENDERER), WCF.glGetString(WCF.GL_VENDOR),
|
WCF.glGetString(GL11.GL_RENDERER), WCF.glGetString(GL11.GL_VENDOR),
|
||||||
this.framecode(), Timing.framerate < 1.0f ? 1.0f / Timing.framerate : Timing.framerate, Timing.framerate < 1.0f ? "SPF" : "FPS",
|
this.framecode(), Timing.framerate < 1.0f ? 1.0f / Timing.framerate : Timing.framerate, Timing.framerate < 1.0f ? "SPF" : "FPS",
|
||||||
this.vsync ? TextColor.DGRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
|
this.vsync ? TextColor.DGRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
|
||||||
(float)PerfSection.getTotal(false) / 1000.0f, this.fb_x, this.fb_y,
|
(float)PerfSection.getTotal(false) / 1000.0f, this.fb_x, this.fb_y,
|
||||||
|
@ -2000,8 +2003,8 @@ public class Game implements IThreadListener {
|
||||||
|
|
||||||
public void setupOverlay() {
|
public void setupOverlay() {
|
||||||
GlState.disableDepth();
|
GlState.disableDepth();
|
||||||
GlState.tryBlendFuncSeparate(WCF.GL_SRC_ALPHA, WCF.GL_ONE_MINUS_SRC_ALPHA, WCF.GL_ONE, WCF.GL_ONE_MINUS_SRC_ALPHA);
|
GlState.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
|
GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
WCF.glClear(256);
|
WCF.glClear(256);
|
||||||
WCF.glMatrixMode(5889);
|
WCF.glMatrixMode(5889);
|
||||||
|
@ -2018,9 +2021,9 @@ public class Game implements IThreadListener {
|
||||||
Log.SYSTEM.info(Config.VERSION);
|
Log.SYSTEM.info(Config.VERSION);
|
||||||
if(!WCF.createWindow(Config.VERSION, System.getProperty("opengl.debug") != null))
|
if(!WCF.createWindow(Config.VERSION, System.getProperty("opengl.debug") != null))
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
Log.SYSTEM.info("OpenGL %s", WCF.glGetString(WCF.GL_VERSION));
|
Log.SYSTEM.info("OpenGL %s", WCF.glGetString(GL11.GL_VERSION));
|
||||||
Log.SYSTEM.info("GL_VENDOR: %s", WCF.glGetString(WCF.GL_VENDOR));
|
Log.SYSTEM.info("GL_VENDOR: %s", WCF.glGetString(GL11.GL_VENDOR));
|
||||||
Log.SYSTEM.info("GL_RENDERER: %s", WCF.glGetString(WCF.GL_RENDERER));
|
Log.SYSTEM.info("GL_RENDERER: %s", WCF.glGetString(GL11.GL_RENDERER));
|
||||||
Log.SYSTEM.info("Starte ...");
|
Log.SYSTEM.info("Starte ...");
|
||||||
|
|
||||||
this.init();
|
this.init();
|
||||||
|
@ -2029,7 +2032,7 @@ public class Game implements IThreadListener {
|
||||||
System.gc();
|
System.gc();
|
||||||
Font.load();
|
Font.load();
|
||||||
GlState.enableBlend();
|
GlState.enableBlend();
|
||||||
GlState.blendFunc(WCF.GL_SRC_ALPHA, WCF.GL_ONE_MINUS_SRC_ALPHA);
|
GlState.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
this.initConsole();
|
this.initConsole();
|
||||||
this.vidMode = WCF.getDisplayMode();
|
this.vidMode = WCF.getDisplayMode();
|
||||||
WCF.initWindow(this.saved_xpos, this.saved_ypos, this.xsize, this.ysize);
|
WCF.initWindow(this.saved_xpos, this.saved_ypos, this.xsize, this.ysize);
|
||||||
|
@ -2056,7 +2059,7 @@ public class Game implements IThreadListener {
|
||||||
Bind.updateBinds();
|
Bind.updateBinds();
|
||||||
this.input();
|
this.input();
|
||||||
Bind.enableInput();
|
Bind.enableInput();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
GlState.bindTexture(0);
|
GlState.bindTexture(0);
|
||||||
this.inputGui();
|
this.inputGui();
|
||||||
if(this.open != null)
|
if(this.open != null)
|
||||||
|
|
|
@ -2,6 +2,8 @@ package game.gui;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import game.Game;
|
import game.Game;
|
||||||
|
@ -18,7 +20,6 @@ import game.vars.ColorVar;
|
||||||
import game.window.Bind;
|
import game.window.Bind;
|
||||||
import game.window.Button;
|
import game.window.Button;
|
||||||
import game.window.Keysym;
|
import game.window.Keysym;
|
||||||
import game.window.WCF;
|
|
||||||
|
|
||||||
public abstract class Gui {
|
public abstract class Gui {
|
||||||
public static final String DIRT_BACKGROUND = "textures/background.png";
|
public static final String DIRT_BACKGROUND = "textures/background.png";
|
||||||
|
@ -327,7 +328,7 @@ public abstract class Gui {
|
||||||
if(this.gm.fb_x != 0 && this.gm.fb_y != 0)
|
if(this.gm.fb_x != 0 && this.gm.fb_y != 0)
|
||||||
this.draw();
|
this.draw();
|
||||||
GlState.bindTexture(0);
|
GlState.bindTexture(0);
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
GlState.enableTexture2D();
|
GlState.enableTexture2D();
|
||||||
GlState.disableDepth();
|
GlState.disableDepth();
|
||||||
this.drawPost();
|
this.drawPost();
|
||||||
|
|
|
@ -3,6 +3,8 @@ package game.gui.container;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
|
@ -351,7 +353,7 @@ public abstract class GuiContainer extends Gui
|
||||||
this.theSlot = null;
|
this.theSlot = null;
|
||||||
int k = 240;
|
int k = 240;
|
||||||
int l = 240;
|
int l = 240;
|
||||||
WCF.glMultiTexCoord2f(WCF.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
|
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
this.drawSlots(mouseX, mouseY);
|
this.drawSlots(mouseX, mouseY);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package game.gui.element;
|
package game.gui.element;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import game.Game;
|
import game.Game;
|
||||||
import game.gui.Font;
|
import game.gui.Font;
|
||||||
import game.gui.Gui;
|
import game.gui.Gui;
|
||||||
|
@ -232,7 +234,7 @@ public abstract class Element {
|
||||||
int y2 = this.size_y - (this.margin_y1 + this.margin_y2);
|
int y2 = this.size_y - (this.margin_y1 + this.margin_y2);
|
||||||
// if(elem.type == ElemType.FIELD) {
|
// if(elem.type == ElemType.FIELD) {
|
||||||
WCF.glScissor(x1 < 0 ? 0 : x1, (this.gm.fb_y - (y1 + y2)) < 0 ? 0 : (this.gm.fb_y - (y1 + y2)), x2 < 0 ? 0 : x2, y2 < 0 ? 0 : y2);
|
WCF.glScissor(x1 < 0 ? 0 : x1, (this.gm.fb_y - (y1 + y2)) < 0 ? 0 : (this.gm.fb_y - (y1 + y2)), x2 < 0 ? 0 : x2, y2 < 0 ? 0 : y2);
|
||||||
WCF.glEnable(WCF.GL_SCISSOR_TEST);
|
WCF.glEnable(GL11.GL_SCISSOR_TEST);
|
||||||
// }
|
// }
|
||||||
// if(this.type == ElemType.CUSTOM)
|
// if(this.type == ElemType.CUSTOM)
|
||||||
// this.func(this, 1);
|
// this.func(this, 1);
|
||||||
|
@ -240,7 +242,7 @@ public abstract class Element {
|
||||||
this.drawForeground(x1, y1, x2, y2);
|
this.drawForeground(x1, y1, x2, y2);
|
||||||
// logd("DBG", "%d @ %d %d -> %d %d", elem.id, x1, y1, elem.pos_x + x2, elem.pos_y + y2);
|
// logd("DBG", "%d @ %d %d -> %d %d", elem.id, x1, y1, elem.pos_x + x2, elem.pos_y + y2);
|
||||||
// if(elem.type == ElemType.FIELD) {
|
// if(elem.type == ElemType.FIELD) {
|
||||||
WCF.glDisable(WCF.GL_SCISSOR_TEST);
|
WCF.glDisable(GL11.GL_SCISSOR_TEST);
|
||||||
// glScissor(0, 0, sys.fb_x, sys.fb_y);
|
// glScissor(0, 0, sys.fb_x, sys.fb_y);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package game.gui.element;
|
package game.gui.element;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import game.gui.Font;
|
import game.gui.Font;
|
||||||
import game.renderer.Drawing;
|
import game.renderer.Drawing;
|
||||||
import game.renderer.Drawing.Offset;
|
import game.renderer.Drawing.Offset;
|
||||||
|
@ -430,9 +432,9 @@ public class Textbox extends Element {
|
||||||
int x2 = this.size_x - (this.margin_x1 + this.margin_x2);
|
int x2 = this.size_x - (this.margin_x1 + this.margin_x2);
|
||||||
int y2 = this.size_y - (this.margin_y1 + this.margin_y2);
|
int y2 = this.size_y - (this.margin_y1 + this.margin_y2);
|
||||||
WCF.glScissor(x1 < 0 ? 0 : x1, (this.gm.fb_y - (y1 + y2)) < 0 ? 0 : (this.gm.fb_y - (y1 + y2)), x2 < 0 ? 0 : x2, y2 < 0 ? 0 : y2);
|
WCF.glScissor(x1 < 0 ? 0 : x1, (this.gm.fb_y - (y1 + y2)) < 0 ? 0 : (this.gm.fb_y - (y1 + y2)), x2 < 0 ? 0 : x2, y2 < 0 ? 0 : y2);
|
||||||
WCF.glEnable(WCF.GL_SCISSOR_TEST);
|
WCF.glEnable(GL11.GL_SCISSOR_TEST);
|
||||||
Drawing.drawRectColor(this.cursorX, this.cursorY, 1, Font.YGLYPH, this.gm.style.cursor);
|
Drawing.drawRectColor(this.cursorX, this.cursorY, 1, Font.YGLYPH, this.gm.style.cursor);
|
||||||
WCF.glDisable(WCF.GL_SCISSOR_TEST);
|
WCF.glDisable(GL11.GL_SCISSOR_TEST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@ import java.nio.ByteOrder;
|
||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
|
|
||||||
import game.Game;
|
import game.Game;
|
||||||
|
@ -708,14 +711,14 @@ public class EntityRenderer {
|
||||||
|
|
||||||
public void disableLightmap()
|
public void disableLightmap()
|
||||||
{
|
{
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE1);
|
GlState.setActiveTexture(GL13.GL_TEXTURE1);
|
||||||
GlState.disableTexture2D();
|
GlState.disableTexture2D();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enableLightmap()
|
public void enableLightmap()
|
||||||
{
|
{
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE1);
|
GlState.setActiveTexture(GL13.GL_TEXTURE1);
|
||||||
WCF.glMatrixMode(5890);
|
WCF.glMatrixMode(5890);
|
||||||
WCF.glLoadIdentity();
|
WCF.glLoadIdentity();
|
||||||
float f = 0.00390625F;
|
float f = 0.00390625F;
|
||||||
|
@ -723,13 +726,13 @@ public class EntityRenderer {
|
||||||
WCF.glTranslatef(8.0F, 8.0F, 8.0F);
|
WCF.glTranslatef(8.0F, 8.0F, 8.0F);
|
||||||
WCF.glMatrixMode(5888);
|
WCF.glMatrixMode(5888);
|
||||||
this.gm.getTextureManager().bindTexture(locationLightMap);
|
this.gm.getTextureManager().bindTexture(locationLightMap);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_MIN_FILTER, WCF.GL_LINEAR);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_MAG_FILTER, WCF.GL_LINEAR);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_WRAP_S, WCF.GL_CLAMP);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_WRAP_T, WCF.GL_CLAMP);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP);
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
GlState.enableTexture2D();
|
GlState.enableTexture2D();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1594,7 +1597,7 @@ public class EntityRenderer {
|
||||||
// flag = ((EntityNPC)entity).capabilities.isCreativeMode;
|
// flag = ((EntityNPC)entity).capabilities.isCreativeMode;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
WCF.glFog(WCF.GL_FOG_COLOR, (FloatBuffer)this.setFogColorBuffer(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F));
|
WCF.glFog(GL11.GL_FOG_COLOR, (FloatBuffer)this.setFogColorBuffer(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F));
|
||||||
WCF.glNormal3f(0.0F, -1.0F, 0.0F);
|
WCF.glNormal3f(0.0F, -1.0F, 0.0F);
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
Block block = ActiveRenderInfo.getBlockAtEntityViewpoint(this.gm.theWorld, entity, partial);
|
Block block = ActiveRenderInfo.getBlockAtEntityViewpoint(this.gm.theWorld, entity, partial);
|
||||||
|
@ -1612,7 +1615,7 @@ public class EntityRenderer {
|
||||||
far = 5.0F + (this.farPlaneDistance - 5.0F) * (1.0F - (float)effect / 20.0F);
|
far = 5.0F + (this.farPlaneDistance - 5.0F) * (1.0F - (float)effect / 20.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GlState.setFog(WCF.GL_LINEAR);
|
GlState.setFog(GL11.GL_LINEAR);
|
||||||
|
|
||||||
if (start == -1)
|
if (start == -1)
|
||||||
{
|
{
|
||||||
|
@ -1637,7 +1640,7 @@ public class EntityRenderer {
|
||||||
// }
|
// }
|
||||||
else if (block.getMaterial().isColdLiquid())
|
else if (block.getMaterial().isColdLiquid())
|
||||||
{
|
{
|
||||||
GlState.setFog(WCF.GL_EXP);
|
GlState.setFog(GL11.GL_EXP);
|
||||||
|
|
||||||
// if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).hasEffect(Potion.waterBreathing))
|
// if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).hasEffect(Potion.waterBreathing))
|
||||||
// {
|
// {
|
||||||
|
@ -1650,13 +1653,13 @@ public class EntityRenderer {
|
||||||
}
|
}
|
||||||
else if (block.getMaterial().isHotLiquid())
|
else if (block.getMaterial().isHotLiquid())
|
||||||
{
|
{
|
||||||
GlState.setFog(WCF.GL_EXP);
|
GlState.setFog(GL11.GL_EXP);
|
||||||
GlState.setFogDensity(2.0F);
|
GlState.setFogDensity(2.0F);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float far = this.farPlaneDistance;
|
float far = this.farPlaneDistance;
|
||||||
GlState.setFog(WCF.GL_LINEAR);
|
GlState.setFog(GL11.GL_LINEAR);
|
||||||
|
|
||||||
if (start == -1)
|
if (start == -1)
|
||||||
{
|
{
|
||||||
|
@ -1683,7 +1686,7 @@ public class EntityRenderer {
|
||||||
|
|
||||||
GlState.enableColorMaterial();
|
GlState.enableColorMaterial();
|
||||||
GlState.setFogEnabled(distance < 1.0f);
|
GlState.setFogEnabled(distance < 1.0f);
|
||||||
GlState.colorMaterial(WCF.GL_FRONT, WCF.GL_AMBIENT);
|
GlState.colorMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package game.renderer;
|
package game.renderer;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import game.window.WCF;
|
import game.window.WCF;
|
||||||
|
|
||||||
public class GlState
|
public class GlState
|
||||||
|
@ -174,7 +177,7 @@ public class GlState
|
||||||
if (param != fogState.mode)
|
if (param != fogState.mode)
|
||||||
{
|
{
|
||||||
fogState.mode = param;
|
fogState.mode = param;
|
||||||
WCF.glFogi(WCF.GL_FOG_MODE, param);
|
WCF.glFogi(GL11.GL_FOG_MODE, param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +186,7 @@ public class GlState
|
||||||
if (param != fogState.density)
|
if (param != fogState.density)
|
||||||
{
|
{
|
||||||
fogState.density = param;
|
fogState.density = param;
|
||||||
WCF.glFogf(WCF.GL_FOG_DENSITY, param);
|
WCF.glFogf(GL11.GL_FOG_DENSITY, param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +195,7 @@ public class GlState
|
||||||
if (param != fogState.start)
|
if (param != fogState.start)
|
||||||
{
|
{
|
||||||
fogState.start = param;
|
fogState.start = param;
|
||||||
WCF.glFogf(WCF.GL_FOG_START, param);
|
WCF.glFogf(GL11.GL_FOG_START, param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +204,7 @@ public class GlState
|
||||||
if (param != fogState.end)
|
if (param != fogState.end)
|
||||||
{
|
{
|
||||||
fogState.end = param;
|
fogState.end = param;
|
||||||
WCF.glFogf(WCF.GL_FOG_END, param);
|
WCF.glFogf(GL11.GL_FOG_END, param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,9 +315,9 @@ public class GlState
|
||||||
|
|
||||||
public static void setActiveTexture(int texture)
|
public static void setActiveTexture(int texture)
|
||||||
{
|
{
|
||||||
if (activeTextureUnit != texture - WCF.GL_TEXTURE0)
|
if (activeTextureUnit != texture - GL13.GL_TEXTURE0)
|
||||||
{
|
{
|
||||||
activeTextureUnit = texture - WCF.GL_TEXTURE0;
|
activeTextureUnit = texture - GL13.GL_TEXTURE0;
|
||||||
WCF.glActiveTexture(texture);
|
WCF.glActiveTexture(texture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -594,9 +597,9 @@ public class GlState
|
||||||
|
|
||||||
private ColorMaterialState()
|
private ColorMaterialState()
|
||||||
{
|
{
|
||||||
this.colorMaterial = new GlState.BooleanState(WCF.GL_COLOR_MATERIAL);
|
this.colorMaterial = new GlState.BooleanState(GL11.GL_COLOR_MATERIAL);
|
||||||
this.face = WCF.GL_FRONT_AND_BACK;
|
this.face = GL11.GL_FRONT_AND_BACK;
|
||||||
this.mode = WCF.GL_AMBIENT_AND_DIFFUSE;
|
this.mode = GL11.GL_AMBIENT_AND_DIFFUSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -637,9 +640,9 @@ public class GlState
|
||||||
|
|
||||||
private FogState()
|
private FogState()
|
||||||
{
|
{
|
||||||
this.fog = new GlState.BooleanState(WCF.GL_FOG);
|
this.fog = new GlState.BooleanState(GL11.GL_FOG);
|
||||||
this.enabled = true;
|
this.enabled = true;
|
||||||
this.mode = WCF.GL_EXP;
|
this.mode = GL11.GL_EXP;
|
||||||
this.density = 1.0F;
|
this.density = 1.0F;
|
||||||
this.start = 0.0F;
|
this.start = 0.0F;
|
||||||
this.end = 1.0F;
|
this.end = 1.0F;
|
||||||
|
|
|
@ -4,6 +4,9 @@ import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import game.Game;
|
import game.Game;
|
||||||
import game.block.Block;
|
import game.block.Block;
|
||||||
import game.entity.npc.EntityNPC;
|
import game.entity.npc.EntityNPC;
|
||||||
|
@ -68,22 +71,22 @@ public class ItemRenderer
|
||||||
GlState.enableLight(0);
|
GlState.enableLight(0);
|
||||||
GlState.enableLight(1);
|
GlState.enableLight(1);
|
||||||
GlState.enableColorMaterial();
|
GlState.enableColorMaterial();
|
||||||
GlState.colorMaterial(WCF.GL_FRONT_AND_BACK, WCF.GL_AMBIENT_AND_DIFFUSE);
|
GlState.colorMaterial(GL11.GL_FRONT_AND_BACK, GL11.GL_AMBIENT_AND_DIFFUSE);
|
||||||
float f = 0.4F;
|
float f = 0.4F;
|
||||||
float f1 = 0.6F;
|
float f1 = 0.6F;
|
||||||
float f2 = 0.0F;
|
float f2 = 0.0F;
|
||||||
WCF.glLight(WCF.GL_LIGHT0, WCF.GL_POSITION, setColorBuffer(
|
WCF.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, setColorBuffer(
|
||||||
(float)LIGHT0_POS.xCoord, (float)LIGHT0_POS.yCoord, (float)LIGHT0_POS.zCoord, 0.0f));
|
(float)LIGHT0_POS.xCoord, (float)LIGHT0_POS.yCoord, (float)LIGHT0_POS.zCoord, 0.0f));
|
||||||
WCF.glLight(WCF.GL_LIGHT0, WCF.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
|
WCF.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
|
||||||
WCF.glLight(WCF.GL_LIGHT0, WCF.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
WCF.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||||
WCF.glLight(WCF.GL_LIGHT0, WCF.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
|
WCF.glLight(GL11.GL_LIGHT0, GL11.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
|
||||||
WCF.glLight(WCF.GL_LIGHT1, WCF.GL_POSITION, setColorBuffer(
|
WCF.glLight(GL11.GL_LIGHT1, GL11.GL_POSITION, setColorBuffer(
|
||||||
(float)LIGHT1_POS.xCoord, (float)LIGHT1_POS.yCoord, (float)LIGHT1_POS.zCoord, 0.0f));
|
(float)LIGHT1_POS.xCoord, (float)LIGHT1_POS.yCoord, (float)LIGHT1_POS.zCoord, 0.0f));
|
||||||
WCF.glLight(WCF.GL_LIGHT1, WCF.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
|
WCF.glLight(GL11.GL_LIGHT1, GL11.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
|
||||||
WCF.glLight(WCF.GL_LIGHT1, WCF.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
WCF.glLight(GL11.GL_LIGHT1, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||||
WCF.glLight(WCF.GL_LIGHT1, WCF.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
|
WCF.glLight(GL11.GL_LIGHT1, GL11.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
|
||||||
GlState.shadeModel(7424);
|
GlState.shadeModel(7424);
|
||||||
WCF.glLightModel(WCF.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(f, f, f, 1.0F));
|
WCF.glLightModel(GL11.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(f, f, f, 1.0F));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void disableStandardItemLighting()
|
public static void disableStandardItemLighting()
|
||||||
|
@ -162,7 +165,7 @@ public class ItemRenderer
|
||||||
int i = this.gm.theWorld.getCombinedLight(new BlockPos(clientPlayer.posX, clientPlayer.posY + (double)clientPlayer.getEyeHeight(), clientPlayer.posZ), 0);
|
int i = this.gm.theWorld.getCombinedLight(new BlockPos(clientPlayer.posX, clientPlayer.posY + (double)clientPlayer.getEyeHeight(), clientPlayer.posZ), 0);
|
||||||
float f = (float)(i & 65535);
|
float f = (float)(i & 65535);
|
||||||
float f1 = (float)(i >> 16);
|
float f1 = (float)(i >> 16);
|
||||||
WCF.glMultiTexCoord2f(WCF.GL_TEXTURE1, f, f1);
|
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, f, f1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,6 +11,9 @@ import java.util.Map;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
@ -1000,13 +1003,13 @@ public class RenderGlobal
|
||||||
|
|
||||||
// if (OpenGl.useVbo())
|
// if (OpenGl.useVbo())
|
||||||
// {
|
// {
|
||||||
WCF.glEnableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE0);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||||
WCF.glEnableClientState(WCF.GL_TEXTURE_COORD_ARRAY);
|
WCF.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE1);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE1);
|
||||||
WCF.glEnableClientState(WCF.GL_TEXTURE_COORD_ARRAY);
|
WCF.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE0);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||||
WCF.glEnableClientState(WCF.GL_COLOR_ARRAY);
|
WCF.glEnableClientState(GL11.GL_COLOR_ARRAY);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.renderChunkLayer(blockLayerIn);
|
this.renderChunkLayer(blockLayerIn);
|
||||||
|
@ -1021,17 +1024,17 @@ public class RenderGlobal
|
||||||
switch (vertexformatelement$enumusage)
|
switch (vertexformatelement$enumusage)
|
||||||
{
|
{
|
||||||
case POSITION:
|
case POSITION:
|
||||||
WCF.glDisableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UV:
|
case UV:
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE0 + i);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE0 + i);
|
||||||
WCF.glDisableClientState(WCF.GL_TEXTURE_COORD_ARRAY);
|
WCF.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE0);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COLOR:
|
case COLOR:
|
||||||
WCF.glDisableClientState(WCF.GL_COLOR_ARRAY);
|
WCF.glDisableClientState(GL11.GL_COLOR_ARRAY);
|
||||||
GlState.resetColor();
|
GlState.resetColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1154,11 +1157,11 @@ public class RenderGlobal
|
||||||
// if (this.vboEnabled)
|
// if (this.vboEnabled)
|
||||||
// {
|
// {
|
||||||
this.skyVBO.bindBuffer();
|
this.skyVBO.bindBuffer();
|
||||||
WCF.glEnableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
WCF.glVertexPointer(3, WCF.GL_FLOAT, 12, 0L);
|
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||||
this.skyVBO.drawArrays(7);
|
this.skyVBO.drawArrays(7);
|
||||||
this.skyVBO.unbindBuffer();
|
this.skyVBO.unbindBuffer();
|
||||||
WCF.glDisableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
|
@ -1263,11 +1266,11 @@ public class RenderGlobal
|
||||||
// if (this.vboEnabled)
|
// if (this.vboEnabled)
|
||||||
// {
|
// {
|
||||||
this.starVBO.bindBuffer();
|
this.starVBO.bindBuffer();
|
||||||
WCF.glEnableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
WCF.glVertexPointer(3, WCF.GL_FLOAT, 12, 0L);
|
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||||
this.starVBO.drawArrays(7);
|
this.starVBO.drawArrays(7);
|
||||||
this.starVBO.unbindBuffer();
|
this.starVBO.unbindBuffer();
|
||||||
WCF.glDisableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
|
@ -1290,11 +1293,11 @@ public class RenderGlobal
|
||||||
// if (this.vboEnabled)
|
// if (this.vboEnabled)
|
||||||
// {
|
// {
|
||||||
this.dstarVBO.bindBuffer();
|
this.dstarVBO.bindBuffer();
|
||||||
WCF.glEnableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
WCF.glVertexPointer(3, WCF.GL_FLOAT, 12, 0L);
|
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||||
this.dstarVBO.drawArrays(7);
|
this.dstarVBO.drawArrays(7);
|
||||||
this.dstarVBO.unbindBuffer();
|
this.dstarVBO.unbindBuffer();
|
||||||
WCF.glDisableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
|
@ -1751,12 +1754,12 @@ public class RenderGlobal
|
||||||
|
|
||||||
private void setupArrayPointers()
|
private void setupArrayPointers()
|
||||||
{
|
{
|
||||||
WCF.glVertexPointer(3, WCF.GL_FLOAT, 28, 0L);
|
WCF.glVertexPointer(3, GL11.GL_FLOAT, 28, 0L);
|
||||||
WCF.glColorPointer(4, WCF.GL_UNSIGNED_BYTE, 28, 12L);
|
WCF.glColorPointer(4, GL11.GL_UNSIGNED_BYTE, 28, 12L);
|
||||||
WCF.glTexCoordPointer(2, WCF.GL_FLOAT, 28, 16L);
|
WCF.glTexCoordPointer(2, GL11.GL_FLOAT, 28, 16L);
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE1);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE1);
|
||||||
WCF.glTexCoordPointer(2, WCF.GL_SHORT, 28, 24L);
|
WCF.glTexCoordPointer(2, GL11.GL_SHORT, 28, 24L);
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE0);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderStarField(int w, int h, int bg, int color, float ticks, Random rand) {
|
public void renderStarField(int w, int h, int bg, int color, float ticks, Random rand) {
|
||||||
|
@ -1769,7 +1772,7 @@ public class RenderGlobal
|
||||||
Drawing.drawRect(0, 0, w, h, bg | 0xff000000);
|
Drawing.drawRect(0, 0, w, h, bg | 0xff000000);
|
||||||
// Gui.drawRect(0, 0, w, h, bg | 0xff000000);
|
// Gui.drawRect(0, 0, w, h, bg | 0xff000000);
|
||||||
for(int z = 0; z < 6; z++) {
|
for(int z = 0; z < 6; z++) {
|
||||||
WCF.glMatrixMode(WCF.GL_MODELVIEW);
|
WCF.glMatrixMode(GL11.GL_MODELVIEW);
|
||||||
WCF.glLoadIdentity();
|
WCF.glLoadIdentity();
|
||||||
float shift = ticks % 30.0f - (float)z * 30.0f;
|
float shift = ticks % 30.0f - (float)z * 30.0f;
|
||||||
int n = z + (int)(ticks / 30.0f);
|
int n = z + (int)(ticks / 30.0f);
|
||||||
|
@ -1779,7 +1782,7 @@ public class RenderGlobal
|
||||||
float timer = (float)((double)(System.nanoTime() / 1000L) / 1000000.0) * 0.12f;
|
float timer = (float)((double)(System.nanoTime() / 1000L) / 1000000.0) * 0.12f;
|
||||||
// Project.gluLookAt(0.0f, 0.0f, shift, ExtMath.sin(timer), ExtMath.cos(timer * 2.0f), shift + ExtMath.cos(timer * 0.33f), 0.0f, ExtMath.sin(timer), ExtMath.cos(timer));
|
// Project.gluLookAt(0.0f, 0.0f, shift, ExtMath.sin(timer), ExtMath.cos(timer * 2.0f), shift + ExtMath.cos(timer * 0.33f), 0.0f, ExtMath.sin(timer), ExtMath.cos(timer));
|
||||||
Project.gluLookAt(0.0f, 0.0f, shift, 0.0f, 0.0f, shift + 1.0f, 0.0f, 1.0f, 0.0f);
|
Project.gluLookAt(0.0f, 0.0f, shift, 0.0f, 0.0f, shift + 1.0f, 0.0f, 1.0f, 0.0f);
|
||||||
WCF.glMatrixMode(WCF.GL_PROJECTION);
|
WCF.glMatrixMode(GL11.GL_PROJECTION);
|
||||||
WCF.glLoadIdentity();
|
WCF.glLoadIdentity();
|
||||||
Project.gluPerspective(90.0f, (float)w / (float)h, 0.05f, 1024.0f);
|
Project.gluPerspective(90.0f, (float)w / (float)h, 0.05f, 1024.0f);
|
||||||
// WCF.glTranslatef(w / 2.0f, h / 2.0f, 0.0f);
|
// WCF.glTranslatef(w / 2.0f, h / 2.0f, 0.0f);
|
||||||
|
@ -1798,21 +1801,21 @@ public class RenderGlobal
|
||||||
ItemRenderer.disableStandardItemLighting();
|
ItemRenderer.disableStandardItemLighting();
|
||||||
GlState.color((float)stars.xCoord, (float)stars.yCoord, (float)stars.zCoord, 1.0f);
|
GlState.color((float)stars.xCoord, (float)stars.yCoord, (float)stars.zCoord, 1.0f);
|
||||||
this.starVBO.bindBuffer();
|
this.starVBO.bindBuffer();
|
||||||
WCF.glEnableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
WCF.glVertexPointer(3, WCF.GL_FLOAT, 12, 0L);
|
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||||
this.starVBO.drawArrays(7);
|
this.starVBO.drawArrays(7);
|
||||||
this.starVBO.unbindBuffer();
|
this.starVBO.unbindBuffer();
|
||||||
WCF.glDisableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
this.dstarVBO.bindBuffer();
|
this.dstarVBO.bindBuffer();
|
||||||
WCF.glEnableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
WCF.glVertexPointer(3, WCF.GL_FLOAT, 12, 0L);
|
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||||
this.dstarVBO.drawArrays(7);
|
this.dstarVBO.drawArrays(7);
|
||||||
this.dstarVBO.unbindBuffer();
|
this.dstarVBO.unbindBuffer();
|
||||||
WCF.glDisableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
GlState.enableTexture2D();
|
GlState.enableTexture2D();
|
||||||
WCF.glMatrixMode(WCF.GL_PROJECTION);
|
WCF.glMatrixMode(GL11.GL_PROJECTION);
|
||||||
WCF.glLoadIdentity();
|
WCF.glLoadIdentity();
|
||||||
WCF.glMatrixMode(WCF.GL_MODELVIEW);
|
WCF.glMatrixMode(GL11.GL_MODELVIEW);
|
||||||
WCF.glLoadIdentity();
|
WCF.glLoadIdentity();
|
||||||
}
|
}
|
||||||
GlState.enableCull();
|
GlState.enableCull();
|
||||||
|
|
|
@ -3,6 +3,9 @@ package game.renderer;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import game.window.WCF;
|
import game.window.WCF;
|
||||||
|
|
||||||
public abstract class Tessellator
|
public abstract class Tessellator
|
||||||
|
@ -36,24 +39,24 @@ public abstract class Tessellator
|
||||||
{
|
{
|
||||||
case POSITION:
|
case POSITION:
|
||||||
WCF.glVertexPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
WCF.glVertexPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
||||||
WCF.glEnableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UV:
|
case UV:
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE0 + l);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE0 + l);
|
||||||
WCF.glTexCoordPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
WCF.glTexCoordPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
||||||
WCF.glEnableClientState(WCF.GL_TEXTURE_COORD_ARRAY);
|
WCF.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE0);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COLOR:
|
case COLOR:
|
||||||
WCF.glColorPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
WCF.glColorPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
||||||
WCF.glEnableClientState(WCF.GL_COLOR_ARRAY);
|
WCF.glEnableClientState(GL11.GL_COLOR_ARRAY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
WCF.glNormalPointer(k, i, bytebuffer);
|
WCF.glNormalPointer(k, i, bytebuffer);
|
||||||
WCF.glEnableClientState(WCF.GL_NORMAL_ARRAY);
|
WCF.glEnableClientState(GL11.GL_NORMAL_ARRAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,22 +72,22 @@ public abstract class Tessellator
|
||||||
switch (vertexformatelement$enumusage1)
|
switch (vertexformatelement$enumusage1)
|
||||||
{
|
{
|
||||||
case POSITION:
|
case POSITION:
|
||||||
WCF.glDisableClientState(WCF.GL_VERTEX_ARRAY);
|
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UV:
|
case UV:
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE0 + k1);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE0 + k1);
|
||||||
WCF.glDisableClientState(WCF.GL_TEXTURE_COORD_ARRAY);
|
WCF.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||||
WCF.glClientActiveTexture(WCF.GL_TEXTURE0);
|
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COLOR:
|
case COLOR:
|
||||||
WCF.glDisableClientState(WCF.GL_COLOR_ARRAY);
|
WCF.glDisableClientState(GL11.GL_COLOR_ARRAY);
|
||||||
GlState.resetColor();
|
GlState.resetColor();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
WCF.glDisableClientState(WCF.GL_NORMAL_ARRAY);
|
WCF.glDisableClientState(GL11.GL_NORMAL_ARRAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package game.renderer.entity;
|
package game.renderer.entity;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import game.entity.Entity;
|
import game.entity.Entity;
|
||||||
import game.entity.item.EntityLeashKnot;
|
import game.entity.item.EntityLeashKnot;
|
||||||
import game.entity.types.EntityLiving;
|
import game.entity.types.EntityLiving;
|
||||||
|
@ -45,7 +47,7 @@ public abstract class RenderLiving<T extends EntityLiving> extends RendererLivin
|
||||||
int l = entity.getBrightnessForRender(partial);
|
int l = entity.getBrightnessForRender(partial);
|
||||||
int a = l % 65536;
|
int a = l % 65536;
|
||||||
int b = l / 65536;
|
int b = l / 65536;
|
||||||
WCF.glMultiTexCoord2f(WCF.GL_TEXTURE1, (float)a / 1.0F, (float)b / 1.0F);
|
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)a / 1.0F, (float)b / 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static double interpolateValue(double start, double end, double pct) {
|
private static double interpolateValue(double start, double end, double pct) {
|
||||||
|
|
|
@ -2,6 +2,8 @@ package game.renderer.entity;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
import game.Game;
|
import game.Game;
|
||||||
|
@ -233,7 +235,7 @@ public class RenderManager
|
||||||
|
|
||||||
int j = i % 65536;
|
int j = i % 65536;
|
||||||
int k = i / 65536;
|
int k = i / 65536;
|
||||||
WCF.glMultiTexCoord2f(WCF.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
return this.renderEntity(entity, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, partialTicks);
|
return this.renderEntity(entity, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, partialTicks);
|
||||||
}
|
}
|
||||||
|
@ -250,7 +252,7 @@ public class RenderManager
|
||||||
int i = entityIn.getBrightnessForRender(partialTicks);
|
int i = entityIn.getBrightnessForRender(partialTicks);
|
||||||
int j = i % 65536;
|
int j = i % 65536;
|
||||||
int k = i / 65536;
|
int k = i / 65536;
|
||||||
WCF.glMultiTexCoord2f(WCF.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
render.renderName(entityIn, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ);
|
render.renderName(entityIn, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package game.renderer.entity;
|
package game.renderer.entity;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import game.entity.item.EntityXp;
|
import game.entity.item.EntityXp;
|
||||||
import game.renderer.DefaultVertexFormats;
|
import game.renderer.DefaultVertexFormats;
|
||||||
import game.renderer.GlState;
|
import game.renderer.GlState;
|
||||||
|
@ -39,7 +41,7 @@ public class RenderXpOrb extends Render<EntityXp>
|
||||||
int j = entity.getBrightnessForRender(partialTicks);
|
int j = entity.getBrightnessForRender(partialTicks);
|
||||||
int k = j % 65536;
|
int k = j % 65536;
|
||||||
int l = j / 65536;
|
int l = j / 65536;
|
||||||
WCF.glMultiTexCoord2f(WCF.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
|
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
float f8 = 255.0F;
|
float f8 = 255.0F;
|
||||||
float f9 = ((float)entity.xpColor + partialTicks) / 2.0F;
|
float f9 = ((float)entity.xpColor + partialTicks) / 2.0F;
|
||||||
|
|
|
@ -5,6 +5,8 @@ import java.nio.ByteOrder;
|
||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import game.color.TextColor;
|
import game.color.TextColor;
|
||||||
|
@ -184,9 +186,9 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
||||||
Log.JNI.error((Throwable)exception, (String)"Konnte Objekt nicht rendern");
|
Log.JNI.error((Throwable)exception, (String)"Konnte Objekt nicht rendern");
|
||||||
}
|
}
|
||||||
|
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE1);
|
GlState.setActiveTexture(GL13.GL_TEXTURE1);
|
||||||
GlState.enableTexture2D();
|
GlState.enableTexture2D();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
GlState.enableCull();
|
GlState.enableCull();
|
||||||
WCF.glPopMatrix();
|
WCF.glPopMatrix();
|
||||||
|
|
||||||
|
@ -222,23 +224,23 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
||||||
float g = (float)(c >> 8 & 255) / 255.0F;
|
float g = (float)(c >> 8 & 255) / 255.0F;
|
||||||
float b = (float)(c & 255) / 255.0F;
|
float b = (float)(c & 255) / 255.0F;
|
||||||
GlState.disableLighting();
|
GlState.disableLighting();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
GlState.color(r, g, b, 1.0F);
|
GlState.color(r, g, b, 1.0F);
|
||||||
GlState.disableTexture2D();
|
GlState.disableTexture2D();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE1);
|
GlState.setActiveTexture(GL13.GL_TEXTURE1);
|
||||||
GlState.disableTexture2D();
|
GlState.disableTexture2D();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void unsetOutlineColor()
|
protected void unsetOutlineColor()
|
||||||
{
|
{
|
||||||
GlState.enableLighting();
|
GlState.enableLighting();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
GlState.enableTexture2D();
|
GlState.enableTexture2D();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE1);
|
GlState.setActiveTexture(GL13.GL_TEXTURE1);
|
||||||
GlState.enableTexture2D();
|
GlState.enableTexture2D();
|
||||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderModel(T entity, float x, float y, float z, float yaw, float pitch, float scale)
|
protected void renderModel(T entity, float x, float y, float z, float yaw, float pitch, float scale)
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package game.renderer.layers;
|
package game.renderer.layers;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import game.entity.animal.EntityDragon;
|
import game.entity.animal.EntityDragon;
|
||||||
import game.renderer.GlState;
|
import game.renderer.GlState;
|
||||||
import game.renderer.entity.RenderDragon;
|
import game.renderer.entity.RenderDragon;
|
||||||
|
@ -27,7 +29,7 @@ public class LayerEnderDragonEyes implements LayerRenderer<EntityDragon>
|
||||||
int i = 61680;
|
int i = 61680;
|
||||||
int j = i % 65536;
|
int j = i % 65536;
|
||||||
int k = i / 65536;
|
int k = i / 65536;
|
||||||
WCF.glMultiTexCoord2f(WCF.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||||
GlState.enableLighting();
|
GlState.enableLighting();
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
this.dragonRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
|
this.dragonRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
|
||||||
|
|
|
@ -2,6 +2,8 @@ package game.renderer.model;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import game.renderer.RenderBuffer;
|
import game.renderer.RenderBuffer;
|
||||||
|
@ -366,7 +368,7 @@ public class ModelRenderer
|
||||||
private void compileDisplayList(float scale)
|
private void compileDisplayList(float scale)
|
||||||
{
|
{
|
||||||
this.displayList = WCF.glGenLists(1);
|
this.displayList = WCF.glGenLists(1);
|
||||||
WCF.glNewList(this.displayList, WCF.GL_COMPILE);
|
WCF.glNewList(this.displayList, GL11.GL_COMPILE);
|
||||||
// Tessellator.getInstance();
|
// Tessellator.getInstance();
|
||||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package game.renderer.particle;
|
package game.renderer.particle;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import game.Game;
|
import game.Game;
|
||||||
import game.entity.Entity;
|
import game.entity.Entity;
|
||||||
import game.renderer.GlState;
|
import game.renderer.GlState;
|
||||||
|
@ -45,7 +47,7 @@ public class EntityPickupFX extends EntityFX
|
||||||
int i = this.getBrightnessForRender(partialTicks);
|
int i = this.getBrightnessForRender(partialTicks);
|
||||||
int j = i % 65536;
|
int j = i % 65536;
|
||||||
int k = i / 65536;
|
int k = i / 65536;
|
||||||
WCF.glMultiTexCoord2f(WCF.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
d6 = d6 - interpPosX;
|
d6 = d6 - interpPosX;
|
||||||
d7 = d7 - interpPosY;
|
d7 = d7 - interpPosY;
|
||||||
|
|
|
@ -9,6 +9,8 @@ import java.nio.IntBuffer;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import game.renderer.GlState;
|
import game.renderer.GlState;
|
||||||
import game.util.FileUtils;
|
import game.util.FileUtils;
|
||||||
import game.window.WCF;
|
import game.window.WCF;
|
||||||
|
@ -22,10 +24,10 @@ public class TextureUtil
|
||||||
public static void uploadTexture(int[] data, int w, int h, int x, int y)
|
public static void uploadTexture(int[] data, int w, int h, int x, int y)
|
||||||
{
|
{
|
||||||
int i = 4194304 / w;
|
int i = 4194304 / w;
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_MIN_FILTER, WCF.GL_NEAREST);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_MAG_FILTER, WCF.GL_NEAREST);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_WRAP_S, WCF.GL_REPEAT);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_WRAP_T, WCF.GL_REPEAT);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
for (int j = 0; j < w * h; j += w * l)
|
for (int j = 0; j < w * h; j += w * l)
|
||||||
|
@ -48,10 +50,10 @@ public class TextureUtil
|
||||||
int h = img.getHeight();
|
int h = img.getHeight();
|
||||||
int k = 4194304 / w;
|
int k = 4194304 / w;
|
||||||
int[] data = new int[k * w];
|
int[] data = new int[k * w];
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_MIN_FILTER, WCF.GL_NEAREST);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_MAG_FILTER, WCF.GL_NEAREST);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_WRAP_S, WCF.GL_REPEAT);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
|
||||||
WCF.glTexParameteri(WCF.GL_TEXTURE_WRAP_T, WCF.GL_REPEAT);
|
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
|
||||||
|
|
||||||
for (int l = 0; l < w * h; l += w * k)
|
for (int l = 0; l < w * h; l += w * k)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,8 @@ package game.renderer.tileentity;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
import game.entity.Entity;
|
import game.entity.Entity;
|
||||||
|
@ -106,7 +108,7 @@ public class TileEntityRendererDispatcher
|
||||||
int i = this.worldObj.getCombinedLight(tileentityIn.getPos(), 0);
|
int i = this.worldObj.getCombinedLight(tileentityIn.getPos(), 0);
|
||||||
int j = i % 65536;
|
int j = i % 65536;
|
||||||
int k = i / 65536;
|
int k = i / 65536;
|
||||||
WCF.glMultiTexCoord2f(WCF.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
BlockPos blockpos = tileentityIn.getPos();
|
BlockPos blockpos = tileentityIn.getPos();
|
||||||
this.renderTileEntityAt(tileentityIn, (double)blockpos.getX() - staticPlayerX, (double)blockpos.getY() - staticPlayerY, (double)blockpos.getZ() - staticPlayerZ, partialTicks, destroyStage);
|
this.renderTileEntityAt(tileentityIn, (double)blockpos.getX() - staticPlayerX, (double)blockpos.getY() - staticPlayerY, (double)blockpos.getZ() - staticPlayerZ, partialTicks, destroyStage);
|
||||||
|
|
|
@ -26,6 +26,7 @@ import org.lwjgl.glfw.GLFWWindowPosCallback;
|
||||||
import org.lwjgl.glfw.GLFWWindowRefreshCallback;
|
import org.lwjgl.glfw.GLFWWindowRefreshCallback;
|
||||||
import org.lwjgl.opengl.GL;
|
import org.lwjgl.opengl.GL;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL12;
|
||||||
import org.lwjgl.opengl.GL13;
|
import org.lwjgl.opengl.GL13;
|
||||||
import org.lwjgl.opengl.GL14;
|
import org.lwjgl.opengl.GL14;
|
||||||
import org.lwjgl.opengl.GL15;
|
import org.lwjgl.opengl.GL15;
|
||||||
|
@ -34,367 +35,11 @@ import org.lwjgl.system.APIUtil;
|
||||||
import game.log.Log;
|
import game.log.Log;
|
||||||
|
|
||||||
public abstract class WCF {
|
public abstract class WCF {
|
||||||
public static final int GL_EXP = 0x800;
|
|
||||||
public static final int GL_LIGHT_MODEL_AMBIENT = 0xB53;
|
|
||||||
public static final int GL_COLOR_MATERIAL = 0xB57;
|
|
||||||
public static final int GL_FOG = 0xB60;
|
|
||||||
public static final int GL_FOG_DENSITY = 0xB62;
|
|
||||||
public static final int GL_FOG_START = 0xB63;
|
|
||||||
public static final int GL_FOG_END = 0xB64;
|
|
||||||
public static final int GL_FOG_MODE = 0xB65;
|
|
||||||
public static final int GL_FOG_COLOR = 0xB66;
|
|
||||||
public static final int GL_LIGHT0 = 0x4000;
|
|
||||||
public static final int GL_LIGHT1 = 0x4001;
|
|
||||||
public static final int GL_AMBIENT = 0x1200;
|
|
||||||
public static final int GL_DIFFUSE = 0x1201;
|
|
||||||
public static final int GL_SPECULAR = 0x1202;
|
|
||||||
public static final int GL_POSITION = 0x1203;
|
|
||||||
public static final int GL_COMPILE = 0x1300;
|
|
||||||
public static final int GL_AMBIENT_AND_DIFFUSE = 0x1602;
|
|
||||||
public static final int GL_MODELVIEW = 0x1700;
|
|
||||||
public static final int GL_PROJECTION = 0x1701;
|
|
||||||
public static final int GL_CLAMP = 0x2900;
|
|
||||||
public static final int GL_VERTEX_ARRAY = 0x8074;
|
|
||||||
public static final int GL_NORMAL_ARRAY = 0x8075;
|
|
||||||
public static final int GL_COLOR_ARRAY = 0x8076;
|
|
||||||
public static final int GL_TEXTURE_COORD_ARRAY = 0x8078;
|
|
||||||
|
|
||||||
public static final int GL_DEPTH_BUFFER_BIT = 0x00000100;
|
|
||||||
public static final int GL_STENCIL_BUFFER_BIT = 0x00000400;
|
|
||||||
public static final int GL_COLOR_BUFFER_BIT = 0x00004000;
|
|
||||||
public static final int GL_FALSE = 0;
|
|
||||||
public static final int GL_TRUE = 1;
|
|
||||||
public static final int GL_POINTS = 0x0000;
|
|
||||||
public static final int GL_LINES = 0x0001;
|
|
||||||
public static final int GL_LINE_LOOP = 0x0002;
|
|
||||||
public static final int GL_LINE_STRIP = 0x0003;
|
|
||||||
public static final int GL_TRIANGLES = 0x0004;
|
|
||||||
public static final int GL_TRIANGLE_STRIP = 0x0005;
|
|
||||||
public static final int GL_TRIANGLE_FAN = 0x0006;
|
|
||||||
public static final int GL_NEVER = 0x0200;
|
|
||||||
public static final int GL_LESS = 0x0201;
|
|
||||||
public static final int GL_EQUAL = 0x0202;
|
|
||||||
public static final int GL_LEQUAL = 0x0203;
|
|
||||||
public static final int GL_GREATER = 0x0204;
|
|
||||||
public static final int GL_NOTEQUAL = 0x0205;
|
|
||||||
public static final int GL_GEQUAL = 0x0206;
|
|
||||||
public static final int GL_ALWAYS = 0x0207;
|
|
||||||
public static final int GL_ZERO = 0;
|
|
||||||
public static final int GL_ONE = 1;
|
|
||||||
public static final int GL_SRC_COLOR = 0x0300;
|
|
||||||
public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301;
|
|
||||||
public static final int GL_SRC_ALPHA = 0x0302;
|
|
||||||
public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303;
|
|
||||||
public static final int GL_DST_ALPHA = 0x0304;
|
|
||||||
public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305;
|
|
||||||
public static final int GL_DST_COLOR = 0x0306;
|
|
||||||
public static final int GL_ONE_MINUS_DST_COLOR = 0x0307;
|
|
||||||
public static final int GL_SRC_ALPHA_SATURATE = 0x0308;
|
|
||||||
public static final int GL_NONE = 0;
|
|
||||||
public static final int GL_FRONT_LEFT = 0x0400;
|
|
||||||
public static final int GL_FRONT_RIGHT = 0x0401;
|
|
||||||
public static final int GL_BACK_LEFT = 0x0402;
|
|
||||||
public static final int GL_BACK_RIGHT = 0x0403;
|
|
||||||
public static final int GL_FRONT = 0x0404;
|
|
||||||
public static final int GL_BACK = 0x0405;
|
|
||||||
public static final int GL_LEFT = 0x0406;
|
|
||||||
public static final int GL_RIGHT = 0x0407;
|
|
||||||
public static final int GL_FRONT_AND_BACK = 0x0408;
|
|
||||||
public static final int GL_NO_ERROR = 0;
|
|
||||||
public static final int GL_INVALID_ENUM = 0x0500;
|
|
||||||
public static final int GL_INVALID_VALUE = 0x0501;
|
|
||||||
public static final int GL_INVALID_OPERATION = 0x0502;
|
|
||||||
public static final int GL_OUT_OF_MEMORY = 0x0505;
|
|
||||||
public static final int GL_CW = 0x0900;
|
|
||||||
public static final int GL_CCW = 0x0901;
|
|
||||||
public static final int GL_POINT_SIZE = 0x0B11;
|
|
||||||
public static final int GL_POINT_SIZE_RANGE = 0x0B12;
|
|
||||||
public static final int GL_POINT_SIZE_GRANULARITY = 0x0B13;
|
|
||||||
public static final int GL_LINE_SMOOTH = 0x0B20;
|
|
||||||
public static final int GL_LINE_WIDTH = 0x0B21;
|
|
||||||
public static final int GL_LINE_WIDTH_RANGE = 0x0B22;
|
|
||||||
public static final int GL_LINE_WIDTH_GRANULARITY = 0x0B23;
|
|
||||||
public static final int GL_POLYGON_MODE = 0x0B40;
|
|
||||||
public static final int GL_POLYGON_SMOOTH = 0x0B41;
|
|
||||||
public static final int GL_CULL_FACE = 0x0B44;
|
|
||||||
public static final int GL_CULL_FACE_MODE = 0x0B45;
|
|
||||||
public static final int GL_FRONT_FACE = 0x0B46;
|
|
||||||
public static final int GL_DEPTH_RANGE = 0x0B70;
|
|
||||||
public static final int GL_DEPTH_TEST = 0x0B71;
|
|
||||||
public static final int GL_DEPTH_WRITEMASK = 0x0B72;
|
|
||||||
public static final int GL_DEPTH_CLEAR_VALUE = 0x0B73;
|
|
||||||
public static final int GL_DEPTH_FUNC = 0x0B74;
|
|
||||||
public static final int GL_STENCIL_TEST = 0x0B90;
|
|
||||||
public static final int GL_STENCIL_CLEAR_VALUE = 0x0B91;
|
|
||||||
public static final int GL_STENCIL_FUNC = 0x0B92;
|
|
||||||
public static final int GL_STENCIL_VALUE_MASK = 0x0B93;
|
|
||||||
public static final int GL_STENCIL_FAIL = 0x0B94;
|
|
||||||
public static final int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95;
|
|
||||||
public static final int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96;
|
|
||||||
public static final int GL_STENCIL_REF = 0x0B97;
|
|
||||||
public static final int GL_STENCIL_WRITEMASK = 0x0B98;
|
|
||||||
public static final int GL_VIEWPORT = 0x0BA2;
|
|
||||||
public static final int GL_DITHER = 0x0BD0;
|
|
||||||
public static final int GL_BLEND_DST = 0x0BE0;
|
|
||||||
public static final int GL_BLEND_SRC = 0x0BE1;
|
|
||||||
public static final int GL_BLEND = 0x0BE2;
|
|
||||||
public static final int GL_LOGIC_OP_MODE = 0x0BF0;
|
|
||||||
public static final int GL_DRAW_BUFFER = 0x0C01;
|
|
||||||
public static final int GL_READ_BUFFER = 0x0C02;
|
|
||||||
public static final int GL_SCISSOR_BOX = 0x0C10;
|
|
||||||
public static final int GL_SCISSOR_TEST = 0x0C11;
|
|
||||||
public static final int GL_COLOR_CLEAR_VALUE = 0x0C22;
|
|
||||||
public static final int GL_COLOR_WRITEMASK = 0x0C23;
|
|
||||||
public static final int GL_DOUBLEBUFFER = 0x0C32;
|
|
||||||
public static final int GL_STEREO = 0x0C33;
|
|
||||||
public static final int GL_LINE_SMOOTH_HINT = 0x0C52;
|
|
||||||
public static final int GL_POLYGON_SMOOTH_HINT = 0x0C53;
|
|
||||||
public static final int GL_UNPACK_SWAP_BYTES = 0x0CF0;
|
|
||||||
public static final int GL_UNPACK_LSB_FIRST = 0x0CF1;
|
|
||||||
public static final int GL_UNPACK_ROW_LENGTH = 0x0CF2;
|
|
||||||
public static final int GL_UNPACK_SKIP_ROWS = 0x0CF3;
|
|
||||||
public static final int GL_UNPACK_SKIP_PIXELS = 0x0CF4;
|
|
||||||
public static final int GL_UNPACK_ALIGNMENT = 0x0CF5;
|
|
||||||
public static final int GL_PACK_SWAP_BYTES = 0x0D00;
|
|
||||||
public static final int GL_PACK_LSB_FIRST = 0x0D01;
|
|
||||||
public static final int GL_PACK_ROW_LENGTH = 0x0D02;
|
|
||||||
public static final int GL_PACK_SKIP_ROWS = 0x0D03;
|
|
||||||
public static final int GL_PACK_SKIP_PIXELS = 0x0D04;
|
|
||||||
public static final int GL_PACK_ALIGNMENT = 0x0D05;
|
|
||||||
public static final int GL_MAX_TEXTURE_SIZE = 0x0D33;
|
|
||||||
public static final int GL_MAX_VIEWPORT_DIMS = 0x0D3A;
|
|
||||||
public static final int GL_SUBPIXEL_BITS = 0x0D50;
|
|
||||||
public static final int GL_TEXTURE_1D = 0x0DE0;
|
|
||||||
public static final int GL_TEXTURE_2D = 0x0DE1;
|
|
||||||
public static final int GL_TEXTURE_WIDTH = 0x1000;
|
|
||||||
public static final int GL_TEXTURE_HEIGHT = 0x1001;
|
|
||||||
public static final int GL_TEXTURE_BORDER_COLOR = 0x1004;
|
|
||||||
public static final int GL_DONT_CARE = 0x1100;
|
|
||||||
public static final int GL_FASTEST = 0x1101;
|
|
||||||
public static final int GL_NICEST = 0x1102;
|
|
||||||
public static final int GL_BYTE = 0x1400;
|
|
||||||
public static final int GL_UNSIGNED_BYTE = 0x1401;
|
|
||||||
public static final int GL_SHORT = 0x1402;
|
|
||||||
public static final int GL_UNSIGNED_SHORT = 0x1403;
|
|
||||||
public static final int GL_INT = 0x1404;
|
|
||||||
public static final int GL_UNSIGNED_INT = 0x1405;
|
|
||||||
public static final int GL_FLOAT = 0x1406;
|
|
||||||
public static final int GL_CLEAR = 0x1500;
|
|
||||||
public static final int GL_AND = 0x1501;
|
|
||||||
public static final int GL_AND_REVERSE = 0x1502;
|
|
||||||
public static final int GL_COPY = 0x1503;
|
|
||||||
public static final int GL_AND_INVERTED = 0x1504;
|
|
||||||
public static final int GL_NOOP = 0x1505;
|
|
||||||
public static final int GL_XOR = 0x1506;
|
|
||||||
public static final int GL_OR = 0x1507;
|
|
||||||
public static final int GL_NOR = 0x1508;
|
|
||||||
public static final int GL_EQUIV = 0x1509;
|
|
||||||
public static final int GL_INVERT = 0x150A;
|
|
||||||
public static final int GL_OR_REVERSE = 0x150B;
|
|
||||||
public static final int GL_COPY_INVERTED = 0x150C;
|
|
||||||
public static final int GL_OR_INVERTED = 0x150D;
|
|
||||||
public static final int GL_NAND = 0x150E;
|
|
||||||
public static final int GL_SET = 0x150F;
|
|
||||||
public static final int GL_TEXTURE = 0x1702;
|
|
||||||
public static final int GL_COLOR = 0x1800;
|
|
||||||
public static final int GL_DEPTH = 0x1801;
|
|
||||||
public static final int GL_STENCIL = 0x1802;
|
|
||||||
public static final int GL_STENCIL_INDEX = 0x1901;
|
|
||||||
public static final int GL_DEPTH_COMPONENT = 0x1902;
|
|
||||||
public static final int GL_RED = 0x1903;
|
|
||||||
public static final int GL_GREEN = 0x1904;
|
|
||||||
public static final int GL_BLUE = 0x1905;
|
|
||||||
public static final int GL_ALPHA = 0x1906;
|
|
||||||
public static final int GL_RGB = 0x1907;
|
|
||||||
public static final int GL_RGBA = 0x1908;
|
|
||||||
public static final int GL_POINT = 0x1B00;
|
|
||||||
public static final int GL_LINE = 0x1B01;
|
|
||||||
public static final int GL_FILL = 0x1B02;
|
|
||||||
public static final int GL_KEEP = 0x1E00;
|
|
||||||
public static final int GL_REPLACE = 0x1E01;
|
|
||||||
public static final int GL_INCR = 0x1E02;
|
|
||||||
public static final int GL_DECR = 0x1E03;
|
|
||||||
public static final int GL_VENDOR = 0x1F00;
|
|
||||||
public static final int GL_RENDERER = 0x1F01;
|
|
||||||
public static final int GL_VERSION = 0x1F02;
|
|
||||||
public static final int GL_EXTENSIONS = 0x1F03;
|
|
||||||
public static final int GL_NEAREST = 0x2600;
|
|
||||||
public static final int GL_LINEAR = 0x2601;
|
|
||||||
public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700;
|
|
||||||
public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701;
|
|
||||||
public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702;
|
|
||||||
public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703;
|
|
||||||
public static final int GL_TEXTURE_MAG_FILTER = 0x2800;
|
|
||||||
public static final int GL_TEXTURE_MIN_FILTER = 0x2801;
|
|
||||||
public static final int GL_TEXTURE_WRAP_S = 0x2802;
|
|
||||||
public static final int GL_TEXTURE_WRAP_T = 0x2803;
|
|
||||||
public static final int GL_REPEAT = 0x2901;
|
|
||||||
public static final int GL_COLOR_LOGIC_OP = 0x0BF2;
|
|
||||||
public static final int GL_POLYGON_OFFSET_UNITS = 0x2A00;
|
|
||||||
public static final int GL_POLYGON_OFFSET_POINT = 0x2A01;
|
|
||||||
public static final int GL_POLYGON_OFFSET_LINE = 0x2A02;
|
|
||||||
public static final int GL_POLYGON_OFFSET_FILL = 0x8037;
|
|
||||||
public static final int GL_POLYGON_OFFSET_FACTOR = 0x8038;
|
|
||||||
public static final int GL_TEXTURE_BINDING_1D = 0x8068;
|
|
||||||
public static final int GL_TEXTURE_BINDING_2D = 0x8069;
|
|
||||||
public static final int GL_TEXTURE_INTERNAL_FORMAT = 0x1003;
|
|
||||||
public static final int GL_TEXTURE_RED_SIZE = 0x805C;
|
|
||||||
public static final int GL_TEXTURE_GREEN_SIZE = 0x805D;
|
|
||||||
public static final int GL_TEXTURE_BLUE_SIZE = 0x805E;
|
|
||||||
public static final int GL_TEXTURE_ALPHA_SIZE = 0x805F;
|
|
||||||
public static final int GL_DOUBLE = 0x140A;
|
|
||||||
public static final int GL_PROXY_TEXTURE_1D = 0x8063;
|
|
||||||
public static final int GL_PROXY_TEXTURE_2D = 0x8064;
|
|
||||||
public static final int GL_R3_G3_B2 = 0x2A10;
|
|
||||||
public static final int GL_RGB4 = 0x804F;
|
|
||||||
public static final int GL_RGB5 = 0x8050;
|
|
||||||
public static final int GL_RGB8 = 0x8051;
|
|
||||||
public static final int GL_RGB10 = 0x8052;
|
|
||||||
public static final int GL_RGB12 = 0x8053;
|
|
||||||
public static final int GL_RGB16 = 0x8054;
|
|
||||||
public static final int GL_RGBA2 = 0x8055;
|
|
||||||
public static final int GL_RGBA4 = 0x8056;
|
|
||||||
public static final int GL_RGB5_A1 = 0x8057;
|
|
||||||
public static final int GL_RGBA8 = 0x8058;
|
|
||||||
public static final int GL_RGB10_A2 = 0x8059;
|
|
||||||
public static final int GL_RGBA12 = 0x805A;
|
|
||||||
public static final int GL_RGBA16 = 0x805B;
|
|
||||||
public static final int GL_UNSIGNED_BYTE_3_3_2 = 0x8032;
|
|
||||||
public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033;
|
|
||||||
public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
|
|
||||||
public static final int GL_UNSIGNED_INT_8_8_8_8 = 0x8035;
|
|
||||||
public static final int GL_UNSIGNED_INT_10_10_10_2 = 0x8036;
|
|
||||||
public static final int GL_TEXTURE_BINDING_3D = 0x806A;
|
|
||||||
public static final int GL_PACK_SKIP_IMAGES = 0x806B;
|
|
||||||
public static final int GL_PACK_IMAGE_HEIGHT = 0x806C;
|
|
||||||
public static final int GL_UNPACK_SKIP_IMAGES = 0x806D;
|
|
||||||
public static final int GL_UNPACK_IMAGE_HEIGHT = 0x806E;
|
|
||||||
public static final int GL_TEXTURE_3D = 0x806F;
|
|
||||||
public static final int GL_PROXY_TEXTURE_3D = 0x8070;
|
|
||||||
public static final int GL_TEXTURE_DEPTH = 0x8071;
|
|
||||||
public static final int GL_TEXTURE_WRAP_R = 0x8072;
|
|
||||||
public static final int GL_MAX_3D_TEXTURE_SIZE = 0x8073;
|
|
||||||
public static final int GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362;
|
|
||||||
public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
|
|
||||||
public static final int GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364;
|
|
||||||
public static final int GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365;
|
|
||||||
public static final int GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366;
|
|
||||||
public static final int GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367;
|
|
||||||
public static final int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368;
|
|
||||||
public static final int GL_BGR = 0x80E0;
|
|
||||||
public static final int GL_BGRA = 0x80E1;
|
|
||||||
public static final int GL_MAX_ELEMENTS_VERTICES = 0x80E8;
|
|
||||||
public static final int GL_MAX_ELEMENTS_INDICES = 0x80E9;
|
|
||||||
public static final int GL_CLAMP_TO_EDGE = 0x812F;
|
|
||||||
public static final int GL_TEXTURE_MIN_LOD = 0x813A;
|
|
||||||
public static final int GL_TEXTURE_MAX_LOD = 0x813B;
|
|
||||||
public static final int GL_TEXTURE_BASE_LEVEL = 0x813C;
|
|
||||||
public static final int GL_TEXTURE_MAX_LEVEL = 0x813D;
|
|
||||||
public static final int GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12;
|
|
||||||
public static final int GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13;
|
|
||||||
public static final int GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22;
|
|
||||||
public static final int GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23;
|
|
||||||
public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E;
|
|
||||||
public static final int GL_TEXTURE0 = 0x84C0;
|
|
||||||
public static final int GL_TEXTURE1 = 0x84C1;
|
|
||||||
public static final int GL_TEXTURE2 = 0x84C2;
|
|
||||||
public static final int GL_TEXTURE3 = 0x84C3;
|
|
||||||
public static final int GL_TEXTURE4 = 0x84C4;
|
|
||||||
public static final int GL_TEXTURE5 = 0x84C5;
|
|
||||||
public static final int GL_TEXTURE6 = 0x84C6;
|
|
||||||
public static final int GL_TEXTURE7 = 0x84C7;
|
|
||||||
public static final int GL_TEXTURE8 = 0x84C8;
|
|
||||||
public static final int GL_TEXTURE9 = 0x84C9;
|
|
||||||
public static final int GL_TEXTURE10 = 0x84CA;
|
|
||||||
public static final int GL_TEXTURE11 = 0x84CB;
|
|
||||||
public static final int GL_TEXTURE12 = 0x84CC;
|
|
||||||
public static final int GL_TEXTURE13 = 0x84CD;
|
|
||||||
public static final int GL_TEXTURE14 = 0x84CE;
|
|
||||||
public static final int GL_TEXTURE15 = 0x84CF;
|
|
||||||
public static final int GL_TEXTURE16 = 0x84D0;
|
|
||||||
public static final int GL_TEXTURE17 = 0x84D1;
|
|
||||||
public static final int GL_TEXTURE18 = 0x84D2;
|
|
||||||
public static final int GL_TEXTURE19 = 0x84D3;
|
|
||||||
public static final int GL_TEXTURE20 = 0x84D4;
|
|
||||||
public static final int GL_TEXTURE21 = 0x84D5;
|
|
||||||
public static final int GL_TEXTURE22 = 0x84D6;
|
|
||||||
public static final int GL_TEXTURE23 = 0x84D7;
|
|
||||||
public static final int GL_TEXTURE24 = 0x84D8;
|
|
||||||
public static final int GL_TEXTURE25 = 0x84D9;
|
|
||||||
public static final int GL_TEXTURE26 = 0x84DA;
|
|
||||||
public static final int GL_TEXTURE27 = 0x84DB;
|
|
||||||
public static final int GL_TEXTURE28 = 0x84DC;
|
|
||||||
public static final int GL_TEXTURE29 = 0x84DD;
|
|
||||||
public static final int GL_TEXTURE30 = 0x84DE;
|
|
||||||
public static final int GL_TEXTURE31 = 0x84DF;
|
|
||||||
public static final int GL_ACTIVE_TEXTURE = 0x84E0;
|
|
||||||
public static final int GL_MULTISAMPLE = 0x809D;
|
|
||||||
public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
|
|
||||||
public static final int GL_SAMPLE_ALPHA_TO_ONE = 0x809F;
|
|
||||||
public static final int GL_SAMPLE_COVERAGE = 0x80A0;
|
|
||||||
public static final int GL_SAMPLE_BUFFERS = 0x80A8;
|
|
||||||
public static final int GL_SAMPLES = 0x80A9;
|
|
||||||
public static final int GL_SAMPLE_COVERAGE_VALUE = 0x80AA;
|
|
||||||
public static final int GL_SAMPLE_COVERAGE_INVERT = 0x80AB;
|
|
||||||
public static final int GL_TEXTURE_CUBE_MAP = 0x8513;
|
|
||||||
public static final int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514;
|
|
||||||
public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
|
|
||||||
public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
|
|
||||||
public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
|
|
||||||
public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
|
|
||||||
public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
|
|
||||||
public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
|
|
||||||
public static final int GL_PROXY_TEXTURE_CUBE_MAP = 0x851B;
|
|
||||||
public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
|
|
||||||
public static final int GL_COMPRESSED_RGB = 0x84ED;
|
|
||||||
public static final int GL_COMPRESSED_RGBA = 0x84EE;
|
|
||||||
public static final int GL_TEXTURE_COMPRESSION_HINT = 0x84EF;
|
|
||||||
public static final int GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0;
|
|
||||||
public static final int GL_TEXTURE_COMPRESSED = 0x86A1;
|
|
||||||
public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
|
|
||||||
public static final int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3;
|
|
||||||
public static final int GL_CLAMP_TO_BORDER = 0x812D;
|
|
||||||
public static final int GL_BLEND_DST_RGB = 0x80C8;
|
|
||||||
public static final int GL_BLEND_SRC_RGB = 0x80C9;
|
|
||||||
public static final int GL_BLEND_DST_ALPHA = 0x80CA;
|
|
||||||
public static final int GL_BLEND_SRC_ALPHA = 0x80CB;
|
|
||||||
public static final int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128;
|
|
||||||
public static final int GL_DEPTH_COMPONENT16 = 0x81A5;
|
|
||||||
public static final int GL_DEPTH_COMPONENT24 = 0x81A6;
|
|
||||||
public static final int GL_DEPTH_COMPONENT32 = 0x81A7;
|
|
||||||
public static final int GL_MIRRORED_REPEAT = 0x8370;
|
|
||||||
public static final int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD;
|
|
||||||
public static final int GL_TEXTURE_LOD_BIAS = 0x8501;
|
|
||||||
public static final int GL_INCR_WRAP = 0x8507;
|
|
||||||
public static final int GL_DECR_WRAP = 0x8508;
|
|
||||||
public static final int GL_TEXTURE_DEPTH_SIZE = 0x884A;
|
|
||||||
public static final int GL_TEXTURE_COMPARE_MODE = 0x884C;
|
|
||||||
public static final int GL_TEXTURE_COMPARE_FUNC = 0x884D;
|
|
||||||
public static final int GL_BLEND_COLOR = 0x8005;
|
|
||||||
public static final int GL_BLEND_EQUATION = 0x8009;
|
|
||||||
public static final int GL_CONSTANT_COLOR = 0x8001;
|
|
||||||
public static final int GL_ONE_MINUS_CONSTANT_COLOR = 0x8002;
|
|
||||||
public static final int GL_CONSTANT_ALPHA = 0x8003;
|
|
||||||
public static final int GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004;
|
|
||||||
public static final int GL_FUNC_ADD = 0x8006;
|
|
||||||
public static final int GL_FUNC_REVERSE_SUBTRACT = 0x800B;
|
|
||||||
public static final int GL_FUNC_SUBTRACT = 0x800A;
|
|
||||||
public static final int GL_MIN = 0x8007;
|
|
||||||
public static final int GL_MAX = 0x8008;
|
|
||||||
public static final int GL_BUFFER_SIZE = 0x8764;
|
|
||||||
public static final int GL_BUFFER_USAGE = 0x8765;
|
|
||||||
public static final int GL_QUERY_COUNTER_BITS = 0x8864;
|
|
||||||
public static final int GL_CURRENT_QUERY = 0x8865;
|
|
||||||
public static final int GL_QUERY_RESULT = 0x8866;
|
|
||||||
public static final int GL_QUERY_RESULT_AVAILABLE = 0x8867;
|
|
||||||
public static final int GL_ARRAY_BUFFER = 0x8892;
|
|
||||||
public static final int GL_STATIC_DRAW = 0x88E4;
|
|
||||||
|
|
||||||
public static void glAlphaFunc(int func, float ref) {
|
public static void glAlphaFunc(int func, float ref) {
|
||||||
GL11.glAlphaFunc(func, ref);
|
GL11.glAlphaFunc(func, ref);
|
||||||
}
|
}
|
||||||
public static void glBindTexture(int texture) {
|
public static void glBindTexture(int texture) {
|
||||||
GL11.glBindTexture(GL_TEXTURE_2D, texture);
|
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
|
||||||
}
|
}
|
||||||
public static void glBlendFunc(int sfactor, int dfactor) {
|
public static void glBlendFunc(int sfactor, int dfactor) {
|
||||||
GL11.glBlendFunc(sfactor, dfactor);
|
GL11.glBlendFunc(sfactor, dfactor);
|
||||||
|
@ -505,10 +150,10 @@ public abstract class WCF {
|
||||||
GL11.glTexCoordPointer(size, type, stride, pointer);
|
GL11.glTexCoordPointer(size, type, stride, pointer);
|
||||||
}
|
}
|
||||||
public static void glTexImage2D(int width, int height) {
|
public static void glTexImage2D(int width, int height) {
|
||||||
GL11.nglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
|
GL11.nglTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, width, height, 0, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
|
||||||
}
|
}
|
||||||
public static void glTexParameteri(int pname, int param) {
|
public static void glTexParameteri(int pname, int param) {
|
||||||
GL11.glTexParameteri(GL_TEXTURE_2D, pname, param);
|
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, pname, param);
|
||||||
}
|
}
|
||||||
public static void glTranslatef(float x, float y, float z) {
|
public static void glTranslatef(float x, float y, float z) {
|
||||||
GL11.glTranslatef(x, y, z);
|
GL11.glTranslatef(x, y, z);
|
||||||
|
@ -529,7 +174,7 @@ public abstract class WCF {
|
||||||
GL11.glViewport(x, y, w, h);
|
GL11.glViewport(x, y, w, h);
|
||||||
}
|
}
|
||||||
public static void glPolygonMode(boolean line) {
|
public static void glPolygonMode(boolean line) {
|
||||||
GL11.glPolygonMode(GL_FRONT_AND_BACK, line ? GL_LINE : GL_FILL);
|
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, line ? GL11.GL_LINE : GL11.GL_FILL);
|
||||||
}
|
}
|
||||||
public static void glFlush() {
|
public static void glFlush() {
|
||||||
GL11.glFlush();
|
GL11.glFlush();
|
||||||
|
@ -544,7 +189,7 @@ public abstract class WCF {
|
||||||
GL11.glGetFloatv(pname, params);
|
GL11.glGetFloatv(pname, params);
|
||||||
}
|
}
|
||||||
public static void glGetInteger(java.nio.IntBuffer params) {
|
public static void glGetInteger(java.nio.IntBuffer params) {
|
||||||
GL11.glGetIntegerv(GL_VIEWPORT, params);
|
GL11.glGetIntegerv(GL11.GL_VIEWPORT, params);
|
||||||
}
|
}
|
||||||
public static void glLight(int light, int pname, java.nio.FloatBuffer params) {
|
public static void glLight(int light, int pname, java.nio.FloatBuffer params) {
|
||||||
GL11.glLightfv(light, pname, params);
|
GL11.glLightfv(light, pname, params);
|
||||||
|
@ -562,13 +207,13 @@ public abstract class WCF {
|
||||||
GL11.glTexCoordPointer(size, type, stride, pointer);
|
GL11.glTexCoordPointer(size, type, stride, pointer);
|
||||||
}
|
}
|
||||||
public static void glTexSubImage2D(int xoffset, int yoffset, int width, int height, java.nio.IntBuffer pixels) {
|
public static void glTexSubImage2D(int xoffset, int yoffset, int width, int height, java.nio.IntBuffer pixels) {
|
||||||
GL11.glTexSubImage2D(GL_TEXTURE_2D, 0, xoffset, yoffset, width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pixels);
|
GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, xoffset, yoffset, width, height, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, pixels);
|
||||||
}
|
}
|
||||||
public static void glVertexPointer(int size, int type, int stride, java.nio.ByteBuffer pointer) {
|
public static void glVertexPointer(int size, int type, int stride, java.nio.ByteBuffer pointer) {
|
||||||
GL11.glVertexPointer(size, type, stride, pointer);
|
GL11.glVertexPointer(size, type, stride, pointer);
|
||||||
}
|
}
|
||||||
public static void glReadPixels(int x, int y, java.nio.ByteBuffer data) {
|
public static void glReadPixels(int x, int y, java.nio.ByteBuffer data) {
|
||||||
GL11.glReadPixels(0, 0, x, y, GL_RGB, GL_UNSIGNED_BYTE, data);
|
GL11.glReadPixels(0, 0, x, y, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void glActiveTexture(int texture) {
|
public static void glActiveTexture(int texture) {
|
||||||
|
@ -586,7 +231,7 @@ public abstract class WCF {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void glBindBuffer(int buffer) {
|
public static void glBindBuffer(int buffer) {
|
||||||
GL15.glBindBuffer(GL_ARRAY_BUFFER, buffer);
|
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer);
|
||||||
}
|
}
|
||||||
public static void glDeleteBuffers(int buffer) {
|
public static void glDeleteBuffers(int buffer) {
|
||||||
GL15.glDeleteBuffers(buffer);
|
GL15.glDeleteBuffers(buffer);
|
||||||
|
@ -595,7 +240,7 @@ public abstract class WCF {
|
||||||
return GL15.glGenBuffers();
|
return GL15.glGenBuffers();
|
||||||
}
|
}
|
||||||
public static void glBufferData(java.nio.ByteBuffer data) {
|
public static void glBufferData(java.nio.ByteBuffer data) {
|
||||||
GL15.glBufferData(GL_ARRAY_BUFFER, data, GL_STATIC_DRAW);
|
GL15.glBufferData(GL15.GL_ARRAY_BUFFER, data, GL15.GL_STATIC_DRAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long getTime() {
|
public static long getTime() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue