inline OpenGL functions to lwjgl GLxx
This commit is contained in:
parent
783adb350b
commit
a2ffb2991d
90 changed files with 1008 additions and 1204 deletions
|
@ -144,8 +144,8 @@ import game.window.Button;
|
|||
import game.window.DisplayMode;
|
||||
import game.window.KeyEvent;
|
||||
import game.window.Keysym;
|
||||
import game.window.WCF;
|
||||
import game.window.Wheel;
|
||||
import game.window.Window;
|
||||
import game.window.WindowEvent;
|
||||
import game.world.BlockPos;
|
||||
import game.world.BoundingBox;
|
||||
|
@ -477,14 +477,14 @@ public class Game implements IThreadListener {
|
|||
GlState.alphaFunc(516, 0.1F);
|
||||
GlState.cullFace(1029);
|
||||
GlState.enableCull();
|
||||
WCF.glMatrixMode(5889);
|
||||
WCF.glLoadIdentity();
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5889);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(5888);
|
||||
this.textureMap = new TextureMap();
|
||||
this.textureManager.loadTexture(TextureMap.locationBlocksTexture, this.textureMap);
|
||||
this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||
this.modelManager = new ModelManager(this.textureMap);
|
||||
this.modelManager.onReload();
|
||||
this.renderItem = new RenderItem(this.textureManager, this.modelManager);
|
||||
|
@ -701,10 +701,10 @@ public class Game implements IThreadListener {
|
|||
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.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
WCF.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
|
||||
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
|
||||
if(this.wireframe) {
|
||||
WCF.glLineWidth(1.0f);
|
||||
WCF.glPolygonMode(true); // GL_FRONT_AND_BACK, GL_LINE
|
||||
GL11.glLineWidth(1.0f);
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE); // GL_FRONT_AND_BACK, GL_LINE
|
||||
}
|
||||
if(this.open == null) {
|
||||
if(this.thePlayer != null)
|
||||
|
@ -715,18 +715,18 @@ public class Game implements IThreadListener {
|
|||
this.soundManager.setListener(this.thePlayer, (float)Timing.tick_fraction);
|
||||
if(this.thePlayer != null && this.thePlayer.isEntityInsideOpaqueBlock())
|
||||
this.thirdPersonView = 0;
|
||||
WCF.glPushMatrix();
|
||||
WCF.glClear(16640);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glClear(16640);
|
||||
GlState.enableTexture2D();
|
||||
if(this.theWorld != null)
|
||||
this.entityRenderer.renderWorld((float)Timing.tick_fraction, System.nanoTime() - this.tickStart);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GlState.disableTexture2D();
|
||||
GlState.disableCull();
|
||||
GlState.enableBlend();
|
||||
if(this.wireframe)
|
||||
WCF.glPolygonMode(false); // GL_FRONT_AND_BACK, GL_FILL
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL); // GL_FRONT_AND_BACK, GL_FILL
|
||||
}
|
||||
|
||||
private static int stats(int x, int y, String name, int value, int max, int color) {
|
||||
|
@ -898,9 +898,9 @@ public class Game implements IThreadListener {
|
|||
// GlState.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
ItemRenderer.enableGUIStandardItemLighting();
|
||||
// this.getTextureManager().bindTexture("textures/gui/inventory.png");
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(this.fb_x / 2 - 180 + 4 + 1, this.fb_y - 40 + 1, 0.0f);
|
||||
WCF.glScalef(2.0f, 2.0f, 2.0f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)(this.fb_x / 2 - 180 + 4 + 1), (float)(this.fb_y - 40 + 1), 0.0f);
|
||||
GL11.glScalef(2.0f, 2.0f, 2.0f);
|
||||
|
||||
for(int index = 0; index < 9; ++index) {
|
||||
int xPos = index * 20;
|
||||
|
@ -913,7 +913,7 @@ public class Game implements IThreadListener {
|
|||
}
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
ItemRenderer.disableStandardItemLighting();
|
||||
GlState.disableRescaleNormal();
|
||||
GlState.disableBlend();
|
||||
|
@ -980,8 +980,8 @@ public class Game implements IThreadListener {
|
|||
"Tickrate: %s%.2f" + TextColor.RESET + " %s [" + TextColor.GREEN + "%.1f" + TextColor.RESET + "], %.3f ms, E %d ms" +
|
||||
"%s%s"
|
||||
,
|
||||
WCF.glGetString(GL11.GL_VERSION), // WCF.glGetString(WCF.GL_SHADING_LANGUAGE_VERSION),
|
||||
WCF.glGetString(GL11.GL_RENDERER), WCF.glGetString(GL11.GL_VENDOR),
|
||||
GL11.glGetString(GL11.GL_VERSION), // WCF.glGetString(WCF.GL_SHADING_LANGUAGE_VERSION),
|
||||
GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VENDOR),
|
||||
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"),
|
||||
(float)PerfSection.getTotal(false) / 1000.0f, this.fb_x, this.fb_y,
|
||||
|
@ -1141,14 +1141,14 @@ public class Game implements IThreadListener {
|
|||
// SKC.setGuiMenu();
|
||||
// else
|
||||
// SKC.setGuiAny();
|
||||
WCF.setTitle(String.format("%s - %s", Config.VERSION, gui.getTitle()));
|
||||
Window.setTitle(String.format("%s - %s", Config.VERSION, gui.getTitle()));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.menu(false);
|
||||
this.leftClickCounter = 10000;
|
||||
Bind.disableMouse();
|
||||
WCF.setTitle(String.format("%s - %s%s", Config.VERSION, "Welt / Render", this.nograb ? "" : " (Maus gefangen)"));
|
||||
Window.setTitle(String.format("%s - %s%s", Config.VERSION, "Welt / Render", this.nograb ? "" : " (Maus gefangen)"));
|
||||
// SKC.setGuiNone();
|
||||
}
|
||||
}
|
||||
|
@ -1813,7 +1813,7 @@ public class Game implements IThreadListener {
|
|||
}
|
||||
|
||||
private void fbsize(int x, int y) {
|
||||
WCF.glViewport(0, 0, x, y);
|
||||
GL11.glViewport(0, 0, x, y);
|
||||
fb_x = x;
|
||||
fb_y = y;
|
||||
if(this.open != null)
|
||||
|
@ -1928,7 +1928,7 @@ public class Game implements IThreadListener {
|
|||
}
|
||||
|
||||
public void poll() {
|
||||
for(WindowEvent event : WCF.poll()) {
|
||||
for(WindowEvent event : Window.poll()) {
|
||||
switch(event.action) {
|
||||
case BUTTON:
|
||||
if(event.param1 >= 0 && event.param1 < Button.values().length)
|
||||
|
@ -1971,19 +1971,19 @@ public class Game implements IThreadListener {
|
|||
|
||||
|
||||
public void menu(boolean menu) {
|
||||
WCF.grabCursor(!menu && !nograb);
|
||||
Window.grabCursor(!menu && !nograb);
|
||||
mouseFirst = true;
|
||||
}
|
||||
|
||||
public void full(boolean full) {
|
||||
if(full != fullscreen && (!full || vidMode != null)) {
|
||||
if(full) {
|
||||
WCF.setFullscreen(vidMode.width, vidMode.height, vidMode.refresh);
|
||||
Window.setFullscreen(vidMode.width, vidMode.height, vidMode.refresh);
|
||||
}
|
||||
else {
|
||||
WCF.setWindowed(saved_xpos, saved_ypos, xsize, ysize);
|
||||
Window.setWindowed(saved_xpos, saved_ypos, xsize, ysize);
|
||||
}
|
||||
WCF.setVSync(vsync);
|
||||
Window.setVSync(vsync);
|
||||
fullscreen = full;
|
||||
}
|
||||
}
|
||||
|
@ -1995,10 +1995,10 @@ public class Game implements IThreadListener {
|
|||
syncLimit = sync;
|
||||
}
|
||||
else {
|
||||
DisplayMode mode = WCF.getDisplayMode();
|
||||
DisplayMode mode = Window.getDisplayMode();
|
||||
syncLimit = mode != null ? mode.refresh : 60;
|
||||
}
|
||||
WCF.setVSync(vsync);
|
||||
Window.setVSync(vsync);
|
||||
}
|
||||
|
||||
public void setupOverlay() {
|
||||
|
@ -2006,24 +2006,24 @@ public class Game implements IThreadListener {
|
|||
GlState.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||
GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
WCF.glClear(256);
|
||||
WCF.glMatrixMode(5889);
|
||||
WCF.glLoadIdentity();
|
||||
WCF.glOrtho(0.0D, (double)this.fb_x, (double)this.fb_y, 0.0D, 1000.0D, 3000.0D);
|
||||
WCF.glMatrixMode(5888);
|
||||
WCF.glLoadIdentity();
|
||||
WCF.glTranslatef(0.0F, 0.0F, -2000.0F);
|
||||
GL11.glClear(256);
|
||||
GL11.glMatrixMode(5889);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glOrtho(0.0D, (double)this.fb_x, (double)this.fb_y, 0.0D, 1000.0D, 3000.0D);
|
||||
GL11.glMatrixMode(5888);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glTranslatef(0.0F, 0.0F, -2000.0F);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
start = WCF.getTime();
|
||||
start = Window.getTime();
|
||||
Log.SYSTEM.info("Java " + System.getProperty("java.version"));
|
||||
Log.SYSTEM.info(Config.VERSION);
|
||||
if(!WCF.createWindow(Config.VERSION, System.getProperty("opengl.debug") != null))
|
||||
if(!Window.createWindow(Config.VERSION, System.getProperty("opengl.debug") != null))
|
||||
System.exit(1);
|
||||
Log.SYSTEM.info("OpenGL %s", WCF.glGetString(GL11.GL_VERSION));
|
||||
Log.SYSTEM.info("GL_VENDOR: %s", WCF.glGetString(GL11.GL_VENDOR));
|
||||
Log.SYSTEM.info("GL_RENDERER: %s", WCF.glGetString(GL11.GL_RENDERER));
|
||||
Log.SYSTEM.info("OpenGL %s", GL11.glGetString(GL11.GL_VERSION));
|
||||
Log.SYSTEM.info("GL_VENDOR: %s", GL11.glGetString(GL11.GL_VENDOR));
|
||||
Log.SYSTEM.info("GL_RENDERER: %s", GL11.glGetString(GL11.GL_RENDERER));
|
||||
Log.SYSTEM.info("Starte ...");
|
||||
|
||||
this.init();
|
||||
|
@ -2034,9 +2034,9 @@ public class Game implements IThreadListener {
|
|||
GlState.enableBlend();
|
||||
GlState.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
this.initConsole();
|
||||
this.vidMode = WCF.getDisplayMode();
|
||||
WCF.initWindow(this.saved_xpos, this.saved_ypos, this.xsize, this.ysize);
|
||||
WCF.setIcon(genTriwave(64, 64, 0x00000000, 0xffff0000, 0xff00ff00, 0xff0000ff, 0xff7f00ff, 0xff000000), 64, 64);
|
||||
this.vidMode = Window.getDisplayMode();
|
||||
Window.initWindow(this.saved_xpos, this.saved_ypos, this.xsize, this.ysize);
|
||||
Window.setIcon(genTriwave(64, 64, 0x00000000, 0xffff0000, 0xff00ff00, 0xff0000ff, 0xff7f00ff, 0xff000000), 64, 64);
|
||||
this.sync(this.sync);
|
||||
this.startSound(true);
|
||||
this.getVar("tic_target").setDefault();
|
||||
|
@ -2075,8 +2075,8 @@ public class Game implements IThreadListener {
|
|||
this.finish();
|
||||
PerfSection.SWAP.enter();
|
||||
if(this.glFlush)
|
||||
WCF.glFlush();
|
||||
WCF.swapBuffers();
|
||||
GL11.glFlush();
|
||||
Window.swapBuffers();
|
||||
PerfSection.EVENTS.enter();
|
||||
Log.flushLog();
|
||||
this.poll();
|
||||
|
@ -2097,7 +2097,7 @@ public class Game implements IThreadListener {
|
|||
Log.flushLog();
|
||||
this.save();
|
||||
Font.unload();
|
||||
WCF.destroyWindow();
|
||||
Window.destroyWindow();
|
||||
Log.SYSTEM.info("Beendet.");
|
||||
}
|
||||
|
||||
|
@ -2175,7 +2175,7 @@ public class Game implements IThreadListener {
|
|||
this.saving = true;
|
||||
final int stride = ((this.fb_x * 3) & 3) != 0 ? 4 + ((this.fb_x * 3) & ~3) : (this.fb_x * 3);
|
||||
final ByteBuffer data = ByteBuffer.allocateDirect(stride * this.fb_y).order(ByteOrder.nativeOrder());
|
||||
WCF.glReadPixels(this.fb_x, this.fb_y, data);
|
||||
GL11.glReadPixels(0, 0, this.fb_x, this.fb_y, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, data);
|
||||
new Thread(new Runnable() {
|
||||
public void run() {
|
||||
byte[] pixels = new byte[stride * Game.this.fb_y];
|
||||
|
@ -2340,7 +2340,7 @@ public class Game implements IThreadListener {
|
|||
}
|
||||
|
||||
public long rtime() {
|
||||
return WCF.getTime() - start;
|
||||
return Window.getTime() - start;
|
||||
}
|
||||
|
||||
public double ftime() {
|
||||
|
@ -2551,7 +2551,7 @@ public class Game implements IThreadListener {
|
|||
|
||||
|
||||
public static void main(String[] args) {
|
||||
WCF.init();
|
||||
Window.init();
|
||||
Locale.setDefault(Locale.ROOT);
|
||||
Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
|
||||
public void uncaughtException(Thread thread, Throwable e) {
|
||||
|
@ -2649,7 +2649,7 @@ public class Game implements IThreadListener {
|
|||
});
|
||||
Thread.currentThread().setName("Render thread");
|
||||
INSTANCE.run();
|
||||
WCF.end();
|
||||
Window.end();
|
||||
}
|
||||
|
||||
|
||||
|
@ -3001,21 +3001,21 @@ public class Game implements IThreadListener {
|
|||
private void renderWorldDirections(float partialTicks) {
|
||||
GlState.enableBlend();
|
||||
GlState.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
WCF.glLineWidth(1.0F);
|
||||
GL11.glLineWidth(1.0F);
|
||||
GlState.disableTexture2D();
|
||||
GlState.depthMask(false);
|
||||
// GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
// WCF.glMatrixMode(5888);
|
||||
// WCF.glLoadIdentity();
|
||||
WCF.glTranslatef(this.fb_x / 2, this.fb_y / 2, 0.0F);
|
||||
GL11.glTranslatef((float)(this.fb_x / 2), (float)(this.fb_y / 2), 0.0F);
|
||||
this.entityRenderer.rotateCamera(this.viewEntity, partialTicks);
|
||||
// WCF.glScalef(-1.0f, -1.0f, -1.0f);
|
||||
// Drawing.drawRectColor(0, 0, 10, 2, 0xff00ff00);
|
||||
RenderGlobal.drawOutlinedBoundingBox(new BoundingBox(0.0D, 0.0D, 0.0D, 24D, 1D, 1D), 255, 0, 0, 255);
|
||||
RenderGlobal.drawOutlinedBoundingBox(new BoundingBox(0.0D, 0.0D, 0.0D, 1D, 1D, 24D), 0, 0, 255, 255);
|
||||
RenderGlobal.drawOutlinedBoundingBox(new BoundingBox(0.0D, 0.0D, 0.0D, 1D, -20D, 1D), 0, 255, 0, 255);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.depthMask(true);
|
||||
GlState.enableTexture2D();
|
||||
GlState.disableBlend();
|
||||
|
|
|
@ -4,11 +4,12 @@ import java.awt.image.BufferedImage;
|
|||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.log.Log;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.texture.TextureUtil;
|
||||
import game.util.FileUtils;
|
||||
import game.window.WCF;
|
||||
|
||||
public class Font {
|
||||
public static final FontChar[] SIZES = new FontChar[256];
|
||||
|
@ -91,14 +92,14 @@ public class Font {
|
|||
int[] data = new int[XGLYPH * 16 * YGLYPH * 16];
|
||||
img.getRGB(0, 0, XGLYPH * 16, YGLYPH * 16, data, 0, XGLYPH * 16);
|
||||
calculate(data, SIZES, XGLYPH, YGLYPH, 0);
|
||||
texture = WCF.glGenTextures();
|
||||
texture = GL11.glGenTextures();
|
||||
TextureUtil.uploadImage(texture, img);
|
||||
Log.RENDER.debug("Font-Textur wurde mit ID #%d geladen", texture);
|
||||
}
|
||||
|
||||
public static void unload() {
|
||||
if(texture != 0) {
|
||||
WCF.glDeleteTextures(texture);
|
||||
GL11.glDeleteTextures(texture);
|
||||
Log.RENDER.debug("Font-Textur mit ID #%d wurde gelöscht", texture);
|
||||
texture = 0;
|
||||
}
|
||||
|
|
|
@ -6,14 +6,14 @@ import game.gui.element.Fill;
|
|||
import game.gui.element.Slider;
|
||||
import game.util.Formatter;
|
||||
import game.window.DisplayMode;
|
||||
import game.window.WCF;
|
||||
import game.window.Window;
|
||||
|
||||
public class GuiDisplay extends GuiOptions {
|
||||
protected GuiDisplay() {
|
||||
}
|
||||
|
||||
public void init(int width, int height) {
|
||||
DisplayMode[] dmodes = WCF.getDisplayModes();
|
||||
DisplayMode[] dmodes = Window.getDisplayModes();
|
||||
if(dmodes != null && dmodes.length > 0) {
|
||||
int offset = 0;
|
||||
int pos = 0;
|
||||
|
|
|
@ -2,9 +2,9 @@ package game.gui;
|
|||
|
||||
import game.color.TextColor;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Label;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Textbox.Action;
|
||||
import game.gui.world.GuiWorlds;
|
||||
import game.init.Config;
|
||||
|
|
|
@ -3,6 +3,7 @@ package game.gui.container;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
@ -24,7 +25,6 @@ import game.renderer.ItemRenderer;
|
|||
import game.renderer.entity.RenderItem;
|
||||
import game.util.ExtMath;
|
||||
import game.window.Button;
|
||||
import game.window.WCF;
|
||||
|
||||
public abstract class GuiContainer extends Gui
|
||||
{
|
||||
|
@ -353,7 +353,7 @@ public abstract class GuiContainer extends Gui
|
|||
this.theSlot = null;
|
||||
int k = 240;
|
||||
int l = 240;
|
||||
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.drawSlots(mouseX, mouseY);
|
||||
|
@ -437,7 +437,7 @@ public abstract class GuiContainer extends Gui
|
|||
*/
|
||||
private void drawItemStack(ItemStack stack, int x, int y, String altText)
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||
// this.zLevel = 200.0F;
|
||||
this.itemRender.zLevel = 200.0F;
|
||||
this.itemRender.renderItemAndEffectIntoGUI(stack, x, y);
|
||||
|
@ -490,13 +490,13 @@ public abstract class GuiContainer extends Gui
|
|||
}
|
||||
|
||||
public void drawPost() {
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((this.gm.fb_x - this.xSize * 2) / 2, (this.gm.fb_y - this.ySize * 2) / 2, 0.0f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)((this.gm.fb_x - this.xSize * 2) / 2), (float)((this.gm.fb_y - this.ySize * 2) / 2), 0.0f);
|
||||
// int k1 = SKC.getMouseX();
|
||||
// int l1 = this.gm.fb_y - SKC.getMouseY() - 1;
|
||||
WCF.glScalef(2.0f, 2.0f, 2.0f);
|
||||
GL11.glScalef(2.0f, 2.0f, 2.0f);
|
||||
this.drawScreen((this.gm.mouse_x - this.container_x) / 2, (this.gm.mouse_y - this.container_y) / 2);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
ItemRenderer.disableStandardItemLighting();
|
||||
// GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.gui.container;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.inventory.ContainerMerchant;
|
||||
import game.inventory.InventoryPlayer;
|
||||
import game.item.ItemStack;
|
||||
|
@ -8,7 +10,6 @@ import game.renderer.GlState;
|
|||
import game.renderer.ItemRenderer;
|
||||
import game.village.MerchantRecipe;
|
||||
import game.village.MerchantRecipeList;
|
||||
import game.window.WCF;
|
||||
import game.world.World;
|
||||
|
||||
public class GuiMerchant extends GuiContainer
|
||||
|
@ -182,7 +183,7 @@ public class GuiMerchant extends GuiContainer
|
|||
ItemStack itemstack = merchantrecipe.getItemToBuy();
|
||||
ItemStack itemstack1 = merchantrecipe.getSecondItemToBuy();
|
||||
ItemStack itemstack2 = merchantrecipe.getItemToSell();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
ItemRenderer.enableGUIStandardItemLighting();
|
||||
GlState.disableLighting();
|
||||
GlState.enableRescaleNormal();
|
||||
|
@ -220,7 +221,7 @@ public class GuiMerchant extends GuiContainer
|
|||
// this.drawCreativeTabHoveringText(I18n.format("merchant.deprecated"), mouseX, mouseY);
|
||||
// }
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.enableLighting();
|
||||
GlState.enableDepth();
|
||||
ItemRenderer.enableStandardItemLighting();
|
||||
|
|
|
@ -11,7 +11,6 @@ import game.renderer.Drawing.Vec2i;
|
|||
import game.util.Formatter;
|
||||
import game.window.Button;
|
||||
import game.window.Keysym;
|
||||
import game.window.WCF;
|
||||
|
||||
public abstract class Element {
|
||||
protected final Game gm = Game.getGame();
|
||||
|
@ -233,8 +232,8 @@ public abstract class Element {
|
|||
int x2 = this.size_x - (this.margin_x1 + this.margin_x2);
|
||||
int y2 = this.size_y - (this.margin_y1 + this.margin_y2);
|
||||
// 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.glEnable(GL11.GL_SCISSOR_TEST);
|
||||
GL11.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);
|
||||
GL11.glEnable(GL11.GL_SCISSOR_TEST);
|
||||
// }
|
||||
// if(this.type == ElemType.CUSTOM)
|
||||
// this.func(this, 1);
|
||||
|
@ -242,7 +241,7 @@ public abstract class Element {
|
|||
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);
|
||||
// if(elem.type == ElemType.FIELD) {
|
||||
WCF.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
// glScissor(0, 0, sys.fb_x, sys.fb_y);
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import game.util.Timing;
|
|||
import game.util.Util;
|
||||
import game.window.Button;
|
||||
import game.window.Keysym;
|
||||
import game.window.WCF;
|
||||
import game.window.Window;
|
||||
|
||||
public class Textbox extends Element {
|
||||
public static enum Action {
|
||||
|
@ -165,14 +165,14 @@ public class Textbox extends Element {
|
|||
// char end = this.text[this.sel_end];
|
||||
// this.text[this.sel_end] = 0;
|
||||
String str = Util.strip(this.text, this.sel_start, this.sel_end - this.sel_start, '\n', (char)0, '?');
|
||||
WCF.setClipboard(str);
|
||||
Window.setClipboard(str);
|
||||
// this.text[this.sel_end] = end;
|
||||
if(key == Keysym.X)
|
||||
insertText("");
|
||||
}
|
||||
}
|
||||
else if(this.editable && ctrl && key == Keysym.V) {
|
||||
insertText(WCF.getClipboard());
|
||||
insertText(Window.getClipboard());
|
||||
}
|
||||
else if(this.editable && !ctrl && key == Keysym.RETURN) {
|
||||
if(this.xbreak) {
|
||||
|
@ -431,10 +431,10 @@ public class Textbox extends Element {
|
|||
int y1 = this.pos_y + this.margin_y1;
|
||||
int x2 = this.size_x - (this.margin_x1 + this.margin_x2);
|
||||
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.glEnable(GL11.GL_SCISSOR_TEST);
|
||||
GL11.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);
|
||||
GL11.glEnable(GL11.GL_SCISSOR_TEST);
|
||||
Drawing.drawRectColor(this.cursorX, this.cursorY, 1, Font.YGLYPH, this.gm.style.cursor);
|
||||
WCF.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
package game.gui.world;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import game.color.TextColor;
|
||||
import game.dimension.DimType;
|
||||
import game.dimension.Dimension;
|
||||
import game.dimension.Space;
|
||||
import game.gui.Gui;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Label;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Textbox.Action;
|
||||
import game.gui.element.TransparentBox;
|
||||
import game.init.Config;
|
||||
|
|
|
@ -31,7 +31,7 @@ import game.renderer.Drawing;
|
|||
import game.util.CharValidator;
|
||||
import game.util.FileCallback;
|
||||
import game.util.FileUtils;
|
||||
import game.window.WCF;
|
||||
import game.window.Window;
|
||||
import game.world.Converter;
|
||||
import game.world.Converter.SaveVersion;
|
||||
import game.world.Region;
|
||||
|
@ -394,7 +394,7 @@ public class GuiWorlds extends GuiList<GuiWorlds.SaveInfo> implements ActButton.
|
|||
}
|
||||
else if (button == this.seedButton)
|
||||
{
|
||||
WCF.setClipboard("" + this.getSelected().getSeed());
|
||||
Window.setClipboard("" + this.getSelected().getSeed());
|
||||
this.warningTimer = 40;
|
||||
this.warningMessage = TextColor.DGREEN + "Startwert wurde in die Zwischenablage kopiert";
|
||||
}
|
||||
|
|
|
@ -5,12 +5,13 @@ import java.nio.ByteOrder;
|
|||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.block.Block;
|
||||
import game.block.BlockLiquid;
|
||||
import game.entity.Entity;
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
import game.world.State;
|
||||
import game.world.Vec3;
|
||||
|
@ -57,9 +58,9 @@ public class ActiveRenderInfo
|
|||
*/
|
||||
public static void updateRenderInfo(EntityNPC entityplayerIn, boolean p_74583_1_)
|
||||
{
|
||||
WCF.glGetFloat(2982, MODELVIEW);
|
||||
WCF.glGetFloat(2983, PROJECTION);
|
||||
WCF.glGetInteger(VIEWPORT);
|
||||
GL11.glGetFloatv(2982, MODELVIEW);
|
||||
GL11.glGetFloatv(2983, PROJECTION);
|
||||
GL11.glGetIntegerv(GL11.GL_VIEWPORT, VIEWPORT);
|
||||
float f = (float)((VIEWPORT.get(0) + VIEWPORT.get(2)) / 2);
|
||||
float f1 = (float)((VIEWPORT.get(1) + VIEWPORT.get(3)) / 2);
|
||||
Project.gluUnProject(f, f1, 0.0F, MODELVIEW, PROJECTION, VIEWPORT, OBJECTCOORDS);
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.BitSet;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import game.Game;
|
||||
|
@ -21,7 +23,6 @@ import game.renderer.texture.TextureAtlasSprite;
|
|||
import game.renderer.texture.TextureMap;
|
||||
import game.renderer.tileentity.TileEntityItemStackRenderer;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
import game.world.Facing;
|
||||
import game.world.IBlockAccess;
|
||||
|
@ -133,7 +134,7 @@ public class BlockRenderer
|
|||
case 2:
|
||||
// this.chestRenderer.renderChestBrightness(state.getBlock(), brightness);
|
||||
GlState.color(brightness, brightness, brightness, 1.0F);
|
||||
WCF.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
TileEntityItemStackRenderer.instance.renderByItem(new ItemStack(state.getBlock()));
|
||||
break;
|
||||
|
||||
|
@ -358,7 +359,7 @@ public class BlockRenderer
|
|||
{
|
||||
Block block = p_178266_2_.getBlock();
|
||||
block.setBlockBoundsForItemRender();
|
||||
WCF.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
int i = block.getRenderColor(block.getStateForEntityRender(p_178266_2_));
|
||||
|
||||
// if (EntityRenderer.anaglyphEnable)
|
||||
|
|
|
@ -27,7 +27,6 @@ import game.renderer.texture.DynamicTexture;
|
|||
import game.renderer.texture.TextureMap;
|
||||
import game.rng.Random;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
import game.world.BoundingBox;
|
||||
import game.world.HitPosition;
|
||||
|
@ -404,7 +403,7 @@ public class EntityRenderer {
|
|||
if (entitylivingbase.getHealth() <= 0)
|
||||
{
|
||||
float f1 = (float)entitylivingbase.deathTime + partialTicks;
|
||||
WCF.glRotatef(40.0F - 8000.0F / (f1 + 200.0F), 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(40.0F - 8000.0F / (f1 + 200.0F), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (f < 0.0F)
|
||||
|
@ -415,9 +414,9 @@ public class EntityRenderer {
|
|||
f = f / (float)entitylivingbase.maxHurtTime;
|
||||
f = ExtMath.sin(f * f * f * f * (float)Math.PI);
|
||||
float f2 = entitylivingbase.attackedYaw;
|
||||
WCF.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-f * 14.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glRotatef(f2, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-f * 14.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(f2, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -433,10 +432,10 @@ public class EntityRenderer {
|
|||
float f1 = -(entityplayer.walkDistMod + f * partialTicks);
|
||||
float f2 = entityplayer.prevCameraYaw + (entityplayer.cameraYaw - entityplayer.prevCameraYaw) * partialTicks;
|
||||
float f3 = entityplayer.prevCamPitch + (entityplayer.camPitch - entityplayer.prevCamPitch) * partialTicks;
|
||||
WCF.glTranslatef(ExtMath.sin(f1 * (float)Math.PI) * f2 * 0.5F, -Math.abs(ExtMath.cos(f1 * (float)Math.PI) * f2), 0.0F);
|
||||
WCF.glRotatef(ExtMath.sin(f1 * (float)Math.PI) * f2 * 3.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glRotatef(Math.abs(ExtMath.cos(f1 * (float)Math.PI - 0.2F) * f2) * 5.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(f3, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(ExtMath.sin(f1 * (float)Math.PI) * f2 * 0.5F, -Math.abs(ExtMath.cos(f1 * (float)Math.PI) * f2), 0.0F);
|
||||
GL11.glRotatef(ExtMath.sin(f1 * (float)Math.PI) * f2 * 3.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(Math.abs(ExtMath.cos(f1 * (float)Math.PI - 0.2F) * f2) * 5.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(f3, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -479,7 +478,7 @@ public class EntityRenderer {
|
|||
|
||||
if (this.gm.debugCamEnable)
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 0.0F, (float)(-d3));
|
||||
GL11.glTranslatef(0.0F, 0.0F, (float)(-d3));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -518,37 +517,37 @@ public class EntityRenderer {
|
|||
|
||||
if (this.gm.thirdPersonView == 2)
|
||||
{
|
||||
WCF.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
WCF.glRotatef(entity.rotPitch - f2, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(entity.rotYaw - f1, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(0.0F, 0.0F, (float)(-d3));
|
||||
WCF.glRotatef(f1 - entity.rotYaw, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(f2 - entity.rotPitch, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(entity.rotPitch - f2, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(entity.rotYaw - f1, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, (float)(-d3));
|
||||
GL11.glRotatef(f1 - entity.rotYaw, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(f2 - entity.rotPitch, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 0.0F, -0.1F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, -0.1F);
|
||||
}
|
||||
|
||||
if (!this.gm.debugCamEnable || this.gm.thirdPersonView == 0)
|
||||
{
|
||||
WCF.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
if (entity instanceof EntityAnimal)
|
||||
{
|
||||
EntityAnimal entityanimal = (EntityAnimal)entity;
|
||||
WCF.glRotatef(entityanimal.prevHeadYaw + (entityanimal.headYaw - entityanimal.prevHeadYaw) * partialTicks + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(entityanimal.prevHeadYaw + (entityanimal.headYaw - entityanimal.prevHeadYaw) * partialTicks + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
WCF.glTranslatef(0.0F, -f, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -f, 0.0F);
|
||||
d0 = entity.prevX + (entity.posX - entity.prevX) * (double)partialTicks;
|
||||
d1 = entity.prevY + (entity.posY - entity.prevY) * (double)partialTicks + (double)f;
|
||||
d2 = entity.prevZ + (entity.posZ - entity.prevZ) * (double)partialTicks;
|
||||
|
@ -556,16 +555,16 @@ public class EntityRenderer {
|
|||
}
|
||||
|
||||
public void rotateCamera(Entity entity, float partialTicks) {
|
||||
WCF.glRotatef(360.0f - (entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks), 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(360.0f - (entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks), 1.0F, 0.0F, 0.0F);
|
||||
|
||||
if (entity instanceof EntityAnimal)
|
||||
{
|
||||
EntityAnimal entityanimal = (EntityAnimal)entity;
|
||||
WCF.glRotatef(entityanimal.prevHeadYaw + (entityanimal.headYaw - entityanimal.prevHeadYaw) * partialTicks + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(entityanimal.prevHeadYaw + (entityanimal.headYaw - entityanimal.prevHeadYaw) * partialTicks + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -575,8 +574,8 @@ public class EntityRenderer {
|
|||
private void setupCameraTransform(float partialTicks)
|
||||
{
|
||||
this.farPlaneDistance = (float)(this.gm.renderDistance * 16);
|
||||
WCF.glMatrixMode(5889);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5889);
|
||||
GL11.glLoadIdentity();
|
||||
float f = 0.07F;
|
||||
|
||||
// if (this.gm.anaglyph)
|
||||
|
@ -591,8 +590,8 @@ public class EntityRenderer {
|
|||
// }
|
||||
|
||||
Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.gm.fb_x / (float)this.gm.fb_y, 0.05F, this.farPlaneDistance * SQRT_2);
|
||||
WCF.glMatrixMode(5888);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5888);
|
||||
GL11.glLoadIdentity();
|
||||
|
||||
// if (this.gm.anaglyph)
|
||||
// {
|
||||
|
@ -659,8 +658,8 @@ public class EntityRenderer {
|
|||
{
|
||||
// if (!this.debugView)
|
||||
// {
|
||||
WCF.glMatrixMode(5889);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5889);
|
||||
GL11.glLoadIdentity();
|
||||
float f = 0.07F;
|
||||
|
||||
// if (this.gm.anaglyph)
|
||||
|
@ -669,15 +668,15 @@ public class EntityRenderer {
|
|||
// }
|
||||
|
||||
Project.gluPerspective(this.getFOVModifier(partialTicks, false), (float)this.gm.fb_x / (float)this.gm.fb_y, 0.05F, this.farPlaneDistance * 2.0F);
|
||||
WCF.glMatrixMode(5888);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5888);
|
||||
GL11.glLoadIdentity();
|
||||
|
||||
// if (this.gm.anaglyph)
|
||||
// {
|
||||
// SKC.glTranslatef((float)(xOffset * 2 - 1) * 0.1F, 0.0F, 0.0F);
|
||||
// }
|
||||
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.hurtCameraEffect(partialTicks);
|
||||
|
||||
// if (this.gm.viewBobbing)
|
||||
|
@ -694,7 +693,7 @@ public class EntityRenderer {
|
|||
this.disableLightmap();
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if (this.gm.thirdPersonView == 0) // && !flag)
|
||||
{
|
||||
|
@ -719,17 +718,17 @@ public class EntityRenderer {
|
|||
public void enableLightmap()
|
||||
{
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE1);
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glLoadIdentity();
|
||||
float f = 0.00390625F;
|
||||
WCF.glScalef(f, f, f);
|
||||
WCF.glTranslatef(8.0F, 8.0F, 8.0F);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glTranslatef(8.0F, 8.0F, 8.0F);
|
||||
GL11.glMatrixMode(5888);
|
||||
this.gm.getTextureManager().bindTexture(locationLightMap);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlState.enableTexture2D();
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||
|
@ -957,7 +956,7 @@ public class EntityRenderer {
|
|||
boolean flag = this.gm.getRenderViewEntity() != null && this.gm.getRenderViewEntity().isPlayer();
|
||||
GlState.enableCull();
|
||||
this.updateFogColor(partialTicks);
|
||||
WCF.glClear(16640);
|
||||
GL11.glClear(16640);
|
||||
this.setupCameraTransform(partialTicks);
|
||||
ActiveRenderInfo.updateRenderInfo(this.gm.thePlayer, this.gm.thirdPersonView == 2);
|
||||
Entity entity = this.gm.getRenderViewEntity();
|
||||
|
@ -968,15 +967,15 @@ public class EntityRenderer {
|
|||
if (this.gm.renderDistance >= 4)
|
||||
{
|
||||
this.setupFog(-1, partialTicks);
|
||||
WCF.glMatrixMode(5889);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5889);
|
||||
GL11.glLoadIdentity();
|
||||
Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.gm.fb_x / (float)this.gm.fb_y, 0.05F, this.farPlaneDistance * 2.0F);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5888);
|
||||
renderglobal.renderSky(partialTicks);
|
||||
WCF.glMatrixMode(5889);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5889);
|
||||
GL11.glLoadIdentity();
|
||||
Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.gm.fb_x / (float)this.gm.fb_y, 0.05F, this.farPlaneDistance * SQRT_2);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5888);
|
||||
}
|
||||
|
||||
this.setupFog(0, partialTicks);
|
||||
|
@ -991,8 +990,8 @@ public class EntityRenderer {
|
|||
ItemRenderer.disableStandardItemLighting();
|
||||
renderglobal.setupTerrain(entity, (double)partialTicks, this.frameCount++, this.gm.thePlayer.noclip);
|
||||
this.gm.renderGlobal.updateChunks(finishTimeNano);
|
||||
WCF.glMatrixMode(5888);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glMatrixMode(5888);
|
||||
GL11.glPushMatrix();
|
||||
GlState.disableAlpha();
|
||||
renderglobal.renderBlockLayer(BlockLayer.SOLID, (double)partialTicks, entity);
|
||||
GlState.enableAlpha();
|
||||
|
@ -1005,16 +1004,16 @@ public class EntityRenderer {
|
|||
|
||||
// if (!this.debugView)
|
||||
// {
|
||||
WCF.glMatrixMode(5888);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glMatrixMode(5888);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
ItemRenderer.enableStandardItemLighting();
|
||||
renderglobal.renderEntities(entity, partialTicks);
|
||||
ItemRenderer.disableStandardItemLighting();
|
||||
this.disableLightmap();
|
||||
WCF.glMatrixMode(5888);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glMatrixMode(5888);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (this.gm.pointed != null && entity.isInsideOfLiquid() && flag)
|
||||
{
|
||||
|
@ -1025,8 +1024,8 @@ public class EntityRenderer {
|
|||
}
|
||||
// }
|
||||
|
||||
WCF.glMatrixMode(5888);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glMatrixMode(5888);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if (flag && this.gm.pointed != null && !entity.isInsideOfLiquid())
|
||||
{
|
||||
|
@ -1081,7 +1080,7 @@ public class EntityRenderer {
|
|||
|
||||
// if (this.renderHand)
|
||||
// {
|
||||
WCF.glClear(256);
|
||||
GL11.glClear(256);
|
||||
this.renderHand(partialTicks);
|
||||
// }
|
||||
}
|
||||
|
@ -1090,21 +1089,21 @@ public class EntityRenderer {
|
|||
{
|
||||
if (this.gm.renderDistance >= 4)
|
||||
{
|
||||
WCF.glMatrixMode(5889);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5889);
|
||||
GL11.glLoadIdentity();
|
||||
Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.gm.fb_x / (float)this.gm.fb_y, 0.05F, this.farPlaneDistance * 4.0F);
|
||||
WCF.glMatrixMode(5888);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glMatrixMode(5888);
|
||||
GL11.glPushMatrix();
|
||||
this.setupFog(0, partialTicks);
|
||||
// renderGlobalIn.renderClouds(partialTicks);
|
||||
if(this.gm.theWorld.dimension.getType().clouds)
|
||||
renderGlobalIn.renderClouds(partialTicks);
|
||||
GlState.disableFog();
|
||||
WCF.glPopMatrix();
|
||||
WCF.glMatrixMode(5889);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glMatrixMode(5889);
|
||||
GL11.glLoadIdentity();
|
||||
Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.gm.fb_x / (float)this.gm.fb_y, 0.05F, this.farPlaneDistance * SQRT_2);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5888);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1224,7 +1223,7 @@ public class EntityRenderer {
|
|||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
GlState.disableCull();
|
||||
WCF.glNormal3f(0.0F, 1.0F, 0.0F);
|
||||
GL11.glNormal3f(0.0F, 1.0F, 0.0F);
|
||||
GlState.enableBlend();
|
||||
GlState.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
GlState.alphaFunc(516, 0.1F);
|
||||
|
@ -1597,8 +1596,8 @@ public class EntityRenderer {
|
|||
// flag = ((EntityNPC)entity).capabilities.isCreativeMode;
|
||||
// }
|
||||
|
||||
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);
|
||||
GL11.glFogfv(GL11.GL_FOG_COLOR, (FloatBuffer)this.setFogColorBuffer(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F));
|
||||
GL11.glNormal3f(0.0F, -1.0F, 0.0F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Block block = ActiveRenderInfo.getBlockAtEntityViewpoint(this.gm.theWorld, entity, partial);
|
||||
|
||||
|
|
|
@ -4,8 +4,9 @@ import java.nio.ByteBuffer;
|
|||
import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.BoundingBox;
|
||||
|
||||
public class Frustum {
|
||||
|
@ -43,8 +44,8 @@ public class Frustum {
|
|||
public void init() {
|
||||
this.projection.clear();
|
||||
this.modelview.clear();
|
||||
WCF.glGetFloat(2983, this.projection);
|
||||
WCF.glGetFloat(2982, this.modelview);
|
||||
GL11.glGetFloatv(2983, this.projection);
|
||||
GL11.glGetFloatv(2982, this.modelview);
|
||||
float[] proj = this.projectionMat;
|
||||
float[] view = this.modelviewMat;
|
||||
this.projection.flip().limit(16);
|
||||
|
|
|
@ -2,8 +2,7 @@ package game.renderer;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import game.window.WCF;
|
||||
import org.lwjgl.opengl.GL14;
|
||||
|
||||
public class GlState
|
||||
{
|
||||
|
@ -44,7 +43,7 @@ public class GlState
|
|||
{
|
||||
alphaState.func = func;
|
||||
alphaState.ref = ref;
|
||||
WCF.glAlphaFunc(func, ref);
|
||||
GL11.glAlphaFunc(func, ref);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +83,7 @@ public class GlState
|
|||
{
|
||||
colorMaterialState.face = face;
|
||||
colorMaterialState.mode = mode;
|
||||
WCF.glColorMaterial(face, mode);
|
||||
GL11.glColorMaterial(face, mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,7 +102,7 @@ public class GlState
|
|||
if (depthFunc != depthState.depthFunc)
|
||||
{
|
||||
depthState.depthFunc = depthFunc;
|
||||
WCF.glDepthFunc(depthFunc);
|
||||
GL11.glDepthFunc(depthFunc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +111,7 @@ public class GlState
|
|||
if (flagIn != depthState.maskEnabled)
|
||||
{
|
||||
depthState.maskEnabled = flagIn;
|
||||
WCF.glDepthMask(flagIn);
|
||||
GL11.glDepthMask(flagIn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,7 +131,7 @@ public class GlState
|
|||
{
|
||||
blendState.srcFactor = srcFactor;
|
||||
blendState.dstFactor = dstFactor;
|
||||
WCF.glBlendFunc(srcFactor, dstFactor);
|
||||
GL11.glBlendFunc(srcFactor, dstFactor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,7 +143,7 @@ public class GlState
|
|||
blendState.dstFactor = dstFactor;
|
||||
blendState.srcFactorAlpha = srcFactorAlpha;
|
||||
blendState.dstFactorAlpha = dstFactorAlpha;
|
||||
WCF.glBlendFuncSeparate(srcFactor, dstFactor, srcFactorAlpha, dstFactorAlpha);
|
||||
GL14.glBlendFuncSeparate(srcFactor, dstFactor, srcFactorAlpha, dstFactorAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +176,7 @@ public class GlState
|
|||
if (param != fogState.mode)
|
||||
{
|
||||
fogState.mode = param;
|
||||
WCF.glFogi(GL11.GL_FOG_MODE, param);
|
||||
GL11.glFogi(GL11.GL_FOG_MODE, param);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,7 +185,7 @@ public class GlState
|
|||
if (param != fogState.density)
|
||||
{
|
||||
fogState.density = param;
|
||||
WCF.glFogf(GL11.GL_FOG_DENSITY, param);
|
||||
GL11.glFogf(GL11.GL_FOG_DENSITY, param);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,7 +194,7 @@ public class GlState
|
|||
if (param != fogState.start)
|
||||
{
|
||||
fogState.start = param;
|
||||
WCF.glFogf(GL11.GL_FOG_START, param);
|
||||
GL11.glFogf(GL11.GL_FOG_START, param);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,7 +203,7 @@ public class GlState
|
|||
if (param != fogState.end)
|
||||
{
|
||||
fogState.end = param;
|
||||
WCF.glFogf(GL11.GL_FOG_END, param);
|
||||
GL11.glFogf(GL11.GL_FOG_END, param);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,7 +222,7 @@ public class GlState
|
|||
if (mode != cullState.mode)
|
||||
{
|
||||
cullState.mode = mode;
|
||||
WCF.glCullFace(mode);
|
||||
GL11.glCullFace(mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,7 +242,7 @@ public class GlState
|
|||
{
|
||||
polygonOffsetState.factor = factor;
|
||||
polygonOffsetState.units = units;
|
||||
WCF.glPolygonOffset(factor, units);
|
||||
GL11.glPolygonOffset(factor, units);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -318,7 +317,7 @@ public class GlState
|
|||
if (activeTextureUnit != texture - GL13.GL_TEXTURE0)
|
||||
{
|
||||
activeTextureUnit = texture - GL13.GL_TEXTURE0;
|
||||
WCF.glActiveTexture(texture);
|
||||
GL13.glActiveTexture(texture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -334,7 +333,7 @@ public class GlState
|
|||
|
||||
public static void deleteTexture(int texture)
|
||||
{
|
||||
WCF.glDeleteTextures(texture);
|
||||
GL11.glDeleteTextures(texture);
|
||||
|
||||
for (GlState.TextureState glstatemanager$texturestate : textureState)
|
||||
{
|
||||
|
@ -350,7 +349,7 @@ public class GlState
|
|||
if (texture != textureState[activeTextureUnit].textureName)
|
||||
{
|
||||
textureState[activeTextureUnit].textureName = texture;
|
||||
WCF.glBindTexture(texture);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -375,7 +374,7 @@ public class GlState
|
|||
if (mode != activeShadeModel)
|
||||
{
|
||||
activeShadeModel = mode;
|
||||
WCF.glShadeModel(mode);
|
||||
GL11.glShadeModel(mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -397,7 +396,7 @@ public class GlState
|
|||
colorMaskState.green = green;
|
||||
colorMaskState.blue = blue;
|
||||
colorMaskState.alpha = alpha;
|
||||
WCF.glColorMask(red, green, blue, alpha);
|
||||
GL11.glColorMask(red, green, blue, alpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -406,7 +405,7 @@ public class GlState
|
|||
if (depth != clearState.depth)
|
||||
{
|
||||
clearState.depth = depth;
|
||||
WCF.glClearDepth(depth);
|
||||
GL11.glClearDepth(depth);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -418,7 +417,7 @@ public class GlState
|
|||
clearState.color.green = green;
|
||||
clearState.color.blue = blue;
|
||||
clearState.color.alpha = alpha;
|
||||
WCF.glClearColor(red, green, blue, alpha);
|
||||
GL11.glClearColor(red, green, blue, alpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -430,7 +429,7 @@ public class GlState
|
|||
colorState.green = colorGreen;
|
||||
colorState.blue = colorBlue;
|
||||
colorState.alpha = colorAlpha;
|
||||
WCF.glColor4f(colorRed, colorGreen, colorBlue, colorAlpha);
|
||||
GL11.glColor4f(colorRed, colorGreen, colorBlue, colorAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -517,11 +516,11 @@ public class GlState
|
|||
|
||||
if (state)
|
||||
{
|
||||
WCF.glEnable(this.capability);
|
||||
GL11.glEnable(this.capability);
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glDisable(this.capability);
|
||||
GL11.glDisable(this.capability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ import game.renderer.entity.RenderNpc;
|
|||
import game.renderer.texture.TextureAtlasSprite;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
import game.world.State;
|
||||
import game.world.Vec3;
|
||||
|
@ -58,11 +57,11 @@ public class ItemRenderer
|
|||
|
||||
public static void enableGUIStandardItemLighting()
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glRotatef(-30.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(165.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(-30.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(165.0F, 1.0F, 0.0F, 0.0F);
|
||||
enableStandardItemLighting();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public static void enableStandardItemLighting()
|
||||
|
@ -75,18 +74,18 @@ public class ItemRenderer
|
|||
float f = 0.4F;
|
||||
float f1 = 0.6F;
|
||||
float f2 = 0.0F;
|
||||
WCF.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, setColorBuffer(
|
||||
GL11.glLightfv(GL11.GL_LIGHT0, GL11.GL_POSITION, setColorBuffer(
|
||||
(float)LIGHT0_POS.xCoord, (float)LIGHT0_POS.yCoord, (float)LIGHT0_POS.zCoord, 0.0f));
|
||||
WCF.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
|
||||
WCF.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||
WCF.glLight(GL11.GL_LIGHT0, GL11.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
|
||||
WCF.glLight(GL11.GL_LIGHT1, GL11.GL_POSITION, setColorBuffer(
|
||||
GL11.glLightfv(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
|
||||
GL11.glLightfv(GL11.GL_LIGHT0, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||
GL11.glLightfv(GL11.GL_LIGHT0, GL11.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
|
||||
GL11.glLightfv(GL11.GL_LIGHT1, GL11.GL_POSITION, setColorBuffer(
|
||||
(float)LIGHT1_POS.xCoord, (float)LIGHT1_POS.yCoord, (float)LIGHT1_POS.zCoord, 0.0f));
|
||||
WCF.glLight(GL11.GL_LIGHT1, GL11.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
|
||||
WCF.glLight(GL11.GL_LIGHT1, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||
WCF.glLight(GL11.GL_LIGHT1, GL11.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
|
||||
GL11.glLightfv(GL11.GL_LIGHT1, GL11.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
|
||||
GL11.glLightfv(GL11.GL_LIGHT1, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||
GL11.glLightfv(GL11.GL_LIGHT1, GL11.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
|
||||
GlState.shadeModel(7424);
|
||||
WCF.glLightModel(GL11.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(f, f, f, 1.0F));
|
||||
GL11.glLightModelfv(GL11.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(f, f, f, 1.0F));
|
||||
}
|
||||
|
||||
public static void disableStandardItemLighting()
|
||||
|
@ -111,11 +110,11 @@ public class ItemRenderer
|
|||
Item item = heldStack.getItem();
|
||||
if(item.isFirstPerson() || transform != Transforms.Camera.FIRST_PERSON) {
|
||||
Block block = item.getBlock();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (this.itemRenderer.shouldRenderItemIn3D(heldStack))
|
||||
{
|
||||
WCF.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
|
||||
if (this.isBlockTranslucent(block))
|
||||
{
|
||||
|
@ -130,7 +129,7 @@ public class ItemRenderer
|
|||
GlState.depthMask(true);
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,11 +149,11 @@ public class ItemRenderer
|
|||
*/
|
||||
private void rotateArroundXAndY(float angle, float angleY)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glRotatef(angle, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(angleY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(angle, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(angleY, 0.0F, 1.0F, 0.0F);
|
||||
ItemRenderer.enableStandardItemLighting();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -165,7 +164,7 @@ public class ItemRenderer
|
|||
int i = this.gm.theWorld.getCombinedLight(new BlockPos(clientPlayer.posX, clientPlayer.posY + (double)clientPlayer.getEyeHeight(), clientPlayer.posZ), 0);
|
||||
float f = (float)(i & 65535);
|
||||
float f1 = (float)(i >> 16);
|
||||
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, f, f1);
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, f, f1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -175,8 +174,8 @@ public class ItemRenderer
|
|||
{
|
||||
float f = entityplayerspIn.prevRenderArmPitch + (entityplayerspIn.renderArmPitch - entityplayerspIn.prevRenderArmPitch) * partialTicks;
|
||||
float f1 = entityplayerspIn.prevRenderArmYaw + (entityplayerspIn.renderArmYaw - entityplayerspIn.prevRenderArmYaw) * partialTicks;
|
||||
WCF.glRotatef((entityplayerspIn.rotPitch - f) * 0.1F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef((entityplayerspIn.rotYaw - f1) * 0.1F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef((entityplayerspIn.rotPitch - f) * 0.1F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef((entityplayerspIn.rotYaw - f1) * 0.1F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -283,21 +282,21 @@ public class ItemRenderer
|
|||
float f = -0.3F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI);
|
||||
float f1 = 0.4F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI * 2.0F);
|
||||
float f2 = -0.4F * ExtMath.sin(swingProgress * (float)Math.PI);
|
||||
WCF.glTranslatef(f, f1, f2);
|
||||
WCF.glTranslatef(0.64000005F, -0.6F, -0.71999997F);
|
||||
WCF.glTranslatef(0.0F, equipProgress * -0.6F, 0.0F);
|
||||
WCF.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(f, f1, f2);
|
||||
GL11.glTranslatef(0.64000005F, -0.6F, -0.71999997F);
|
||||
GL11.glTranslatef(0.0F, equipProgress * -0.6F, 0.0F);
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
float f3 = ExtMath.sin(swingProgress * swingProgress * (float)Math.PI);
|
||||
float f4 = ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI);
|
||||
WCF.glRotatef(f4 * 70.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(f3 * -20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(f4 * 70.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(f3 * -20.0F, 0.0F, 0.0F, 1.0F);
|
||||
this.gm.getTextureManager().bindTexture(clientPlayer.getLocationSkin());
|
||||
WCF.glTranslatef(-1.0F, 3.6F, 3.5F);
|
||||
WCF.glRotatef(120.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glRotatef(200.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glScalef(1.0F, 1.0F, 1.0F);
|
||||
WCF.glTranslatef(5.6F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(-1.0F, 3.6F, 3.5F);
|
||||
GL11.glRotatef(120.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(200.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
GL11.glTranslatef(5.6F, 0.0F, 0.0F);
|
||||
RenderNpc render = this.renderManager.getRenderObject(this.gm.thePlayer.getModel());
|
||||
GlState.disableCull();
|
||||
render.renderPlayerArm(this.gm.thePlayer);
|
||||
|
@ -314,7 +313,7 @@ public class ItemRenderer
|
|||
float f = -0.4F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI);
|
||||
float f1 = 0.2F * ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI * 2.0F);
|
||||
float f2 = -0.2F * ExtMath.sin(swingProgress * (float)Math.PI);
|
||||
WCF.glTranslatef(f, f1, f2);
|
||||
GL11.glTranslatef(f, f1, f2);
|
||||
}
|
||||
|
||||
// /**
|
||||
|
@ -346,15 +345,15 @@ public class ItemRenderer
|
|||
*/
|
||||
private void transformFirstPersonItem(float equipProgress, float swingProgress)
|
||||
{
|
||||
WCF.glTranslatef(0.56F, -0.52F, -0.71999997F);
|
||||
WCF.glTranslatef(0.0F, equipProgress * -0.6F, 0.0F);
|
||||
WCF.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.56F, -0.52F, -0.71999997F);
|
||||
GL11.glTranslatef(0.0F, equipProgress * -0.6F, 0.0F);
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
float f = ExtMath.sin(swingProgress * swingProgress * (float)Math.PI);
|
||||
float f1 = ExtMath.sin(ExtMath.sqrtf(swingProgress) * (float)Math.PI);
|
||||
WCF.glRotatef(f * -20.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(f1 * -20.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glRotatef(f1 * -80.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glScalef(0.4F, 0.4F, 0.4F);
|
||||
GL11.glRotatef(f * -20.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(f1 * -20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(f1 * -80.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -364,10 +363,10 @@ public class ItemRenderer
|
|||
*/
|
||||
private void doBowTransformations(float partialTicks, EntityNPC clientPlayer)
|
||||
{
|
||||
WCF.glRotatef(-18.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glRotatef(-12.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-8.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glTranslatef(-0.9F, 0.2F, 0.0F);
|
||||
GL11.glRotatef(-18.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-12.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-8.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.9F, 0.2F, 0.0F);
|
||||
float f = (float)this.itemToRender.getMaxItemUseDuration() - ((float)clientPlayer.getItemInUseCount() - partialTicks + 1.0F);
|
||||
float f1 = f / 20.0F;
|
||||
f1 = (f1 * f1 + f1 * 2.0F) / 3.0F;
|
||||
|
@ -382,11 +381,11 @@ public class ItemRenderer
|
|||
float f2 = ExtMath.sin((f - 0.1F) * 1.3F);
|
||||
float f3 = f1 - 0.1F;
|
||||
float f4 = f2 * f3;
|
||||
WCF.glTranslatef(f4 * 0.0F, f4 * 0.01F, f4 * 0.0F);
|
||||
GL11.glTranslatef(f4 * 0.0F, f4 * 0.01F, f4 * 0.0F);
|
||||
}
|
||||
|
||||
WCF.glTranslatef(f1 * 0.0F, f1 * 0.0F, f1 * 0.1F);
|
||||
WCF.glScalef(1.0F, 1.0F, 1.0F + f1 * 0.2F);
|
||||
GL11.glTranslatef(f1 * 0.0F, f1 * 0.0F, f1 * 0.1F);
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F + f1 * 0.2F);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -394,10 +393,10 @@ public class ItemRenderer
|
|||
*/
|
||||
private void doBlockTransformations()
|
||||
{
|
||||
WCF.glTranslatef(-0.5F, 0.2F, 0.0F);
|
||||
WCF.glRotatef(30.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-80.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(60.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.2F, 0.0F);
|
||||
GL11.glRotatef(30.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-80.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(60.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -414,7 +413,7 @@ public class ItemRenderer
|
|||
this.setLightMapFromPlayer(clientplayer);
|
||||
this.rotateWithPlayerRotations(clientplayer, partialTicks);
|
||||
GlState.enableRescaleNormal();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (this.itemToRender != null)
|
||||
{
|
||||
|
@ -462,7 +461,7 @@ public class ItemRenderer
|
|||
this.renderPlayerArm(clientplayer, f, f1);
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.disableRescaleNormal();
|
||||
ItemRenderer.disableStandardItemLighting();
|
||||
}
|
||||
|
@ -519,7 +518,7 @@ public class ItemRenderer
|
|||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
float f = 0.1F;
|
||||
GlState.color(0.1F, 0.1F, 0.1F, 0.5F);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
float f1 = -1.0F;
|
||||
float f2 = 1.0F;
|
||||
float f3 = -1.0F;
|
||||
|
@ -535,7 +534,7 @@ public class ItemRenderer
|
|||
worldrenderer.pos(1.0D, 1.0D, -0.5D).tex((double)f6, (double)f8).endVertex();
|
||||
worldrenderer.pos(-1.0D, 1.0D, -0.5D).tex((double)f7, (double)f8).endVertex();
|
||||
Tessellator.draw();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
@ -557,7 +556,7 @@ public class ItemRenderer
|
|||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
TextureAtlasSprite textureatlassprite = this.gm.getTextureMapBlocks().getAtlasSprite("blocks/fire_layer_1");
|
||||
this.gm.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||
float f1 = textureatlassprite.getMinU();
|
||||
|
@ -569,15 +568,15 @@ public class ItemRenderer
|
|||
float f7 = 0.0F - f / 2.0F;
|
||||
float f8 = f7 + f;
|
||||
float f9 = -0.5F;
|
||||
WCF.glTranslatef((float)(-(i * 2 - 1)) * 0.24F, -0.3F, 0.0F);
|
||||
WCF.glRotatef((float)(i * 2 - 1) * 10.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef((float)(-(i * 2 - 1)) * 0.24F, -0.3F, 0.0F);
|
||||
GL11.glRotatef((float)(i * 2 - 1) * 10.0F, 0.0F, 1.0F, 0.0F);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
worldrenderer.pos((double)f5, (double)f7, (double)f9).tex((double)f2, (double)f4).endVertex();
|
||||
worldrenderer.pos((double)f6, (double)f7, (double)f9).tex((double)f1, (double)f4).endVertex();
|
||||
worldrenderer.pos((double)f6, (double)f8, (double)f9).tex((double)f1, (double)f3).endVertex();
|
||||
worldrenderer.pos((double)f5, (double)f8, (double)f9).tex((double)f2, (double)f3).endVertex();
|
||||
Tessellator.draw();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.nio.ByteOrder;
|
|||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import game.window.WCF;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
/**
|
||||
* Project.java
|
||||
|
@ -251,7 +251,7 @@ public class Project {
|
|||
matrix.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ);
|
||||
matrix.put(3 * 4 + 3, 0);
|
||||
|
||||
WCF.glMultMatrix(matrix);
|
||||
GL11.glMultMatrixf(matrix);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -311,8 +311,8 @@ public class Project {
|
|||
matrix.put(1 * 4 + 2, -forward[1]);
|
||||
matrix.put(2 * 4 + 2, -forward[2]);
|
||||
|
||||
WCF.glMultMatrix(matrix);
|
||||
WCF.glTranslatef(-eyex, -eyey, -eyez);
|
||||
GL11.glMultMatrixf(matrix);
|
||||
GL11.glTranslatef(-eyex, -eyey, -eyez);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,6 +13,7 @@ import java.util.Set;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL15;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
@ -42,7 +43,6 @@ import game.rng.Random;
|
|||
import game.tileentity.TileEntity;
|
||||
import game.tileentity.TileEntityChest;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
import game.world.BoundingBox;
|
||||
import game.world.Chunk;
|
||||
|
@ -526,7 +526,7 @@ public class RenderGlobal
|
|||
ItemRenderer.disableStandardItemLighting();
|
||||
GlState.enableBlend();
|
||||
GlState.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
WCF.glLineWidth(2.0F);
|
||||
GL11.glLineWidth(2.0F);
|
||||
GlState.disableTexture2D();
|
||||
GlState.depthMask(false);
|
||||
|
||||
|
@ -566,7 +566,7 @@ public class RenderGlobal
|
|||
ItemRenderer.disableStandardItemLighting();
|
||||
GlState.enableBlend();
|
||||
GlState.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
WCF.glLineWidth(2.0F);
|
||||
GL11.glLineWidth(2.0F);
|
||||
GlState.disableTexture2D();
|
||||
GlState.depthMask(false);
|
||||
|
||||
|
@ -1003,13 +1003,13 @@ public class RenderGlobal
|
|||
|
||||
// if (OpenGl.useVbo())
|
||||
// {
|
||||
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
WCF.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE1);
|
||||
WCF.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
WCF.glEnableClientState(GL11.GL_COLOR_ARRAY);
|
||||
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
GL11.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE1);
|
||||
GL11.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
GL11.glEnableClientState(GL11.GL_COLOR_ARRAY);
|
||||
// }
|
||||
|
||||
this.renderChunkLayer(blockLayerIn);
|
||||
|
@ -1024,17 +1024,17 @@ public class RenderGlobal
|
|||
switch (vertexformatelement$enumusage)
|
||||
{
|
||||
case POSITION:
|
||||
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
break;
|
||||
|
||||
case UV:
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE0 + i);
|
||||
WCF.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE0 + i);
|
||||
GL11.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
break;
|
||||
|
||||
case COLOR:
|
||||
WCF.glDisableClientState(GL11.GL_COLOR_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_COLOR_ARRAY);
|
||||
GlState.resetColor();
|
||||
}
|
||||
}
|
||||
|
@ -1081,31 +1081,31 @@ public class RenderGlobal
|
|||
|
||||
for (int i = 0; i < 6; ++i)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (i == 1)
|
||||
{
|
||||
WCF.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (i == 2)
|
||||
{
|
||||
WCF.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (i == 3)
|
||||
{
|
||||
WCF.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (i == 4)
|
||||
{
|
||||
WCF.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (i == 5)
|
||||
{
|
||||
WCF.glRotatef(-90.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-90.0F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
|
@ -1114,7 +1114,7 @@ public class RenderGlobal
|
|||
worldrenderer.pos(100.0D, -100.0D, 100.0D).tex(16.0D, 16.0D).color(40, 40, 40, 255).endVertex();
|
||||
worldrenderer.pos(100.0D, -100.0D, -100.0D).tex(16.0D, 0.0D).color(40, 40, 40, 255).endVertex();
|
||||
Tessellator.draw();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GlState.depthMask(true);
|
||||
|
@ -1157,11 +1157,11 @@ public class RenderGlobal
|
|||
// if (this.vboEnabled)
|
||||
// {
|
||||
this.skyVBO.bindBuffer();
|
||||
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.nglVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
this.skyVBO.drawArrays(7);
|
||||
this.skyVBO.unbindBuffer();
|
||||
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
@ -1180,10 +1180,10 @@ public class RenderGlobal
|
|||
{
|
||||
GlState.disableTexture2D();
|
||||
GlState.shadeModel(7425);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(ExtMath.sin(this.theWorld.getCelestialAngleRadians(partialTicks)) < 0.0F ? 180.0F : 0.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(ExtMath.sin(this.theWorld.getCelestialAngleRadians(partialTicks)) < 0.0F ? 180.0F : 0.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||
float f6 = afloat[0];
|
||||
float f7 = afloat[1];
|
||||
float f8 = afloat[2];
|
||||
|
@ -1211,17 +1211,17 @@ public class RenderGlobal
|
|||
}
|
||||
|
||||
Tessellator.draw();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.shadeModel(7424);
|
||||
}
|
||||
|
||||
GlState.enableTexture2D();
|
||||
GlState.tryBlendFuncSeparate(770, 1, 1, 0);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
float f16 = 1.0F - Math.max(this.theWorld.getRainStrength(), this.theWorld.getFogStrength());
|
||||
GlState.color(1.0F, 1.0F, 1.0F, f16);
|
||||
WCF.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(this.theWorld.getCelestialAngle(partialTicks) * 360.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(this.theWorld.getCelestialAngle(partialTicks) * 360.0F, 1.0F, 0.0F, 0.0F);
|
||||
if(this.gm.theWorld.dimension.getType().sun) {
|
||||
float size = 30.0F;
|
||||
this.renderEngine.bindTexture(SUN_TEX);
|
||||
|
@ -1266,11 +1266,11 @@ public class RenderGlobal
|
|||
// if (this.vboEnabled)
|
||||
// {
|
||||
this.starVBO.bindBuffer();
|
||||
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.nglVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
this.starVBO.drawArrays(7);
|
||||
this.starVBO.unbindBuffer();
|
||||
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
@ -1293,11 +1293,11 @@ public class RenderGlobal
|
|||
// if (this.vboEnabled)
|
||||
// {
|
||||
this.dstarVBO.bindBuffer();
|
||||
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.nglVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
this.dstarVBO.drawArrays(7);
|
||||
this.dstarVBO.unbindBuffer();
|
||||
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
@ -1309,7 +1309,7 @@ public class RenderGlobal
|
|||
GlState.disableBlend();
|
||||
GlState.enableAlpha();
|
||||
GlState.enableFog();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.enableTexture2D();
|
||||
GlState.depthMask(true);
|
||||
}
|
||||
|
@ -1366,7 +1366,7 @@ public class RenderGlobal
|
|||
int k = 8;
|
||||
int l = 4;
|
||||
float f21 = 9.765625E-4F;
|
||||
WCF.glScalef(12.0F, 1.0F, 12.0F);
|
||||
GL11.glScalef(12.0F, 1.0F, 12.0F);
|
||||
|
||||
for (int i1 = 0; i1 < 2; ++i1)
|
||||
{
|
||||
|
@ -1509,7 +1509,7 @@ public class RenderGlobal
|
|||
GlState.enablePolygonOffset();
|
||||
GlState.alphaFunc(516, 0.1F);
|
||||
GlState.enableAlpha();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
}
|
||||
|
||||
private void postRenderDamagedBlocks()
|
||||
|
@ -1519,7 +1519,7 @@ public class RenderGlobal
|
|||
GlState.disablePolygonOffset();
|
||||
GlState.enableAlpha();
|
||||
GlState.depthMask(true);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void drawBlockDamageTexture(RenderBuffer worldRendererIn, Entity entityIn, float partialTicks)
|
||||
|
@ -1585,7 +1585,7 @@ public class RenderGlobal
|
|||
GlState.enableBlend();
|
||||
GlState.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
GlState.color(0.0F, 0.0F, 0.0F, 0.4F);
|
||||
WCF.glLineWidth(2.0F);
|
||||
GL11.glLineWidth(2.0F);
|
||||
GlState.disableTexture2D();
|
||||
GlState.depthMask(false);
|
||||
float f = 0.002F;
|
||||
|
@ -1722,7 +1722,7 @@ public class RenderGlobal
|
|||
private void preRenderChunk(RenderChunk renderChunkIn)
|
||||
{
|
||||
BlockPos blockpos = renderChunkIn.getPosition();
|
||||
WCF.glTranslatef((float)((double)blockpos.getX() - this.viewEntityX), (float)((double)blockpos.getY() - this.viewEntityY), (float)((double)blockpos.getZ() - this.viewEntityZ));
|
||||
GL11.glTranslatef((float)((double)blockpos.getX() - this.viewEntityX), (float)((double)blockpos.getY() - this.viewEntityY), (float)((double)blockpos.getZ() - this.viewEntityZ));
|
||||
}
|
||||
|
||||
private void addRenderChunk(RenderChunk renderChunkIn, BlockLayer layer)
|
||||
|
@ -1737,16 +1737,16 @@ public class RenderGlobal
|
|||
for (RenderChunk renderchunk : this.renderChunks)
|
||||
{
|
||||
VertexBuffer vertexbuffer = renderchunk.getVertexBufferByLayer(layer.ordinal());
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.preRenderChunk(renderchunk);
|
||||
renderchunk.multModelviewMatrix();
|
||||
vertexbuffer.bindBuffer();
|
||||
this.setupArrayPointers();
|
||||
vertexbuffer.drawArrays(7);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
WCF.glBindBuffer(0);
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
|
||||
GlState.resetColor();
|
||||
this.renderChunks.clear();
|
||||
}
|
||||
|
@ -1754,12 +1754,12 @@ public class RenderGlobal
|
|||
|
||||
private void setupArrayPointers()
|
||||
{
|
||||
WCF.glVertexPointer(3, GL11.GL_FLOAT, 28, 0L);
|
||||
WCF.glColorPointer(4, GL11.GL_UNSIGNED_BYTE, 28, 12L);
|
||||
WCF.glTexCoordPointer(2, GL11.GL_FLOAT, 28, 16L);
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE1);
|
||||
WCF.glTexCoordPointer(2, GL11.GL_SHORT, 28, 24L);
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
GL11.nglVertexPointer(3, GL11.GL_FLOAT, 28, 0L);
|
||||
GL11.nglColorPointer(4, GL11.GL_UNSIGNED_BYTE, 28, 12L);
|
||||
GL11.glTexCoordPointer(2, GL11.GL_FLOAT, 28, 16L);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE1);
|
||||
GL11.glTexCoordPointer(2, GL11.GL_SHORT, 28, 24L);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
}
|
||||
|
||||
public void renderStarField(int w, int h, int bg, int color, float ticks, Random rand) {
|
||||
|
@ -1772,18 +1772,18 @@ public class RenderGlobal
|
|||
Drawing.drawRect(0, 0, w, h, bg | 0xff000000);
|
||||
// Gui.drawRect(0, 0, w, h, bg | 0xff000000);
|
||||
for(int z = 0; z < 6; z++) {
|
||||
WCF.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glLoadIdentity();
|
||||
float shift = ticks % 30.0f - (float)z * 30.0f;
|
||||
int n = z + (int)(ticks / 30.0f);
|
||||
// WCF.glTranslatef(0.0f, 0.0f, (float)n * -30.0f);
|
||||
rand.setSeed((long)n * 8436723957L);
|
||||
WCF.glRotatef(rand.floatv() * 360.0f, 0.0f, 0.0f, 1.0f);
|
||||
GL11.glRotatef(rand.floatv() * 360.0f, 0.0f, 0.0f, 1.0f);
|
||||
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, 0.0f, 0.0f, shift + 1.0f, 0.0f, 1.0f, 0.0f);
|
||||
WCF.glMatrixMode(GL11.GL_PROJECTION);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
||||
GL11.glLoadIdentity();
|
||||
Project.gluPerspective(90.0f, (float)w / (float)h, 0.05f, 1024.0f);
|
||||
// WCF.glTranslatef(w / 2.0f, h / 2.0f, 0.0f);
|
||||
// GlState.disableDepth();
|
||||
|
@ -1801,22 +1801,22 @@ public class RenderGlobal
|
|||
ItemRenderer.disableStandardItemLighting();
|
||||
GlState.color((float)stars.xCoord, (float)stars.yCoord, (float)stars.zCoord, 1.0f);
|
||||
this.starVBO.bindBuffer();
|
||||
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.nglVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
this.starVBO.drawArrays(7);
|
||||
this.starVBO.unbindBuffer();
|
||||
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
this.dstarVBO.bindBuffer();
|
||||
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
WCF.glVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.nglVertexPointer(3, GL11.GL_FLOAT, 12, 0L);
|
||||
this.dstarVBO.drawArrays(7);
|
||||
this.dstarVBO.unbindBuffer();
|
||||
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GlState.enableTexture2D();
|
||||
WCF.glMatrixMode(GL11.GL_PROJECTION);
|
||||
WCF.glLoadIdentity();
|
||||
WCF.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glLoadIdentity();
|
||||
}
|
||||
GlState.enableCull();
|
||||
this.gm.setupOverlay();
|
||||
|
|
|
@ -6,8 +6,6 @@ import java.util.List;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import game.window.WCF;
|
||||
|
||||
public abstract class Tessellator
|
||||
{
|
||||
private static final RenderBuffer BUFFER = new RenderBuffer(2097152);
|
||||
|
@ -38,29 +36,29 @@ public abstract class Tessellator
|
|||
switch (vertexformatelement$enumusage)
|
||||
{
|
||||
case POSITION:
|
||||
WCF.glVertexPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
||||
WCF.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.glVertexPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
||||
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
break;
|
||||
|
||||
case UV:
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE0 + l);
|
||||
WCF.glTexCoordPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
||||
WCF.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE0 + l);
|
||||
GL11.glTexCoordPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
||||
GL11.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
break;
|
||||
|
||||
case COLOR:
|
||||
WCF.glColorPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
||||
WCF.glEnableClientState(GL11.GL_COLOR_ARRAY);
|
||||
GL11.glColorPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
||||
GL11.glEnableClientState(GL11.GL_COLOR_ARRAY);
|
||||
break;
|
||||
|
||||
case NORMAL:
|
||||
WCF.glNormalPointer(k, i, bytebuffer);
|
||||
WCF.glEnableClientState(GL11.GL_NORMAL_ARRAY);
|
||||
GL11.glNormalPointer(k, i, bytebuffer);
|
||||
GL11.glEnableClientState(GL11.GL_NORMAL_ARRAY);
|
||||
}
|
||||
}
|
||||
|
||||
WCF.glDrawArrays(BUFFER.getDrawMode(), 0, BUFFER.getVertexCount());
|
||||
GL11.glDrawArrays(BUFFER.getDrawMode(), 0, BUFFER.getVertexCount());
|
||||
int i1 = 0;
|
||||
|
||||
for (int j1 = list.size(); i1 < j1; ++i1)
|
||||
|
@ -72,22 +70,22 @@ public abstract class Tessellator
|
|||
switch (vertexformatelement$enumusage1)
|
||||
{
|
||||
case POSITION:
|
||||
WCF.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
break;
|
||||
|
||||
case UV:
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE0 + k1);
|
||||
WCF.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
WCF.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE0 + k1);
|
||||
GL11.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||
GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
|
||||
break;
|
||||
|
||||
case COLOR:
|
||||
WCF.glDisableClientState(GL11.GL_COLOR_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_COLOR_ARRAY);
|
||||
GlState.resetColor();
|
||||
break;
|
||||
|
||||
case NORMAL:
|
||||
WCF.glDisableClientState(GL11.GL_NORMAL_ARRAY);
|
||||
GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@ package game.renderer;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import game.window.WCF;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL15;
|
||||
|
||||
public class VertexBuffer
|
||||
{
|
||||
|
@ -13,37 +14,37 @@ public class VertexBuffer
|
|||
public VertexBuffer(VertexFormat vertexFormatIn)
|
||||
{
|
||||
this.vertexFormat = vertexFormatIn;
|
||||
this.glBufferId = WCF.glGenBuffers();
|
||||
this.glBufferId = GL15.glGenBuffers();
|
||||
}
|
||||
|
||||
public void bindBuffer()
|
||||
{
|
||||
WCF.glBindBuffer(this.glBufferId);
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, this.glBufferId);
|
||||
}
|
||||
|
||||
public void bufferData(ByteBuffer p_181722_1_)
|
||||
{
|
||||
this.bindBuffer();
|
||||
WCF.glBufferData(p_181722_1_);
|
||||
GL15.glBufferData(GL15.GL_ARRAY_BUFFER, p_181722_1_, GL15.GL_STATIC_DRAW);
|
||||
this.unbindBuffer();
|
||||
this.count = p_181722_1_.limit() / this.vertexFormat.getNextOffset();
|
||||
}
|
||||
|
||||
public void drawArrays(int mode)
|
||||
{
|
||||
WCF.glDrawArrays(mode, 0, this.count);
|
||||
GL11.glDrawArrays(mode, 0, this.count);
|
||||
}
|
||||
|
||||
public void unbindBuffer()
|
||||
{
|
||||
WCF.glBindBuffer(0);
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
public void deleteGlBuffers()
|
||||
{
|
||||
if (this.glBufferId >= 0)
|
||||
{
|
||||
WCF.glDeleteBuffers(this.glBufferId);
|
||||
GL15.glDeleteBuffers(this.glBufferId);
|
||||
this.glBufferId = -1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package game.renderer.blockmodel;
|
||||
|
||||
import game.window.WCF;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public enum Transforms {
|
||||
DEFAULT(
|
||||
|
@ -153,11 +153,11 @@ public enum Transforms {
|
|||
public void apply(Camera type) {
|
||||
Transform vec = this.get(type);
|
||||
if(vec != Transform.IDENTITY) {
|
||||
WCF.glTranslatef(vec.translation.x, vec.translation.y, vec.translation.z);
|
||||
WCF.glRotatef(vec.rotation.y, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(vec.rotation.x, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(vec.rotation.z, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glScalef(vec.scale.x, vec.scale.y, vec.scale.z);
|
||||
GL11.glTranslatef(vec.translation.x, vec.translation.y, vec.translation.z);
|
||||
GL11.glRotatef(vec.rotation.y, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(vec.rotation.x, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(vec.rotation.z, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(vec.scale.x, vec.scale.y, vec.scale.z);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
@ -23,7 +25,6 @@ import game.renderer.VertexBuffer;
|
|||
import game.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import game.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import game.tileentity.TileEntity;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
import game.world.BoundingBox;
|
||||
import game.world.Facing;
|
||||
|
@ -311,19 +312,19 @@ public class RenderChunk
|
|||
|
||||
private void initModelviewMatrix()
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glLoadIdentity();
|
||||
float f = 1.000001F;
|
||||
WCF.glTranslatef(-8.0F, -8.0F, -8.0F);
|
||||
WCF.glScalef(f, f, f);
|
||||
WCF.glTranslatef(8.0F, 8.0F, 8.0F);
|
||||
WCF.glGetFloat(2982, this.modelviewMatrix);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glTranslatef(-8.0F, -8.0F, -8.0F);
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glTranslatef(8.0F, 8.0F, 8.0F);
|
||||
GL11.glGetFloatv(2982, this.modelviewMatrix);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void multModelviewMatrix()
|
||||
{
|
||||
WCF.glMultMatrix(this.modelviewMatrix);
|
||||
GL11.glMultMatrixf(this.modelviewMatrix);
|
||||
}
|
||||
|
||||
public CompiledChunk getCompiledChunk()
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.block.Block;
|
||||
import game.entity.Entity;
|
||||
|
@ -12,7 +14,6 @@ import game.renderer.RenderBuffer;
|
|||
import game.renderer.Tessellator;
|
||||
import game.renderer.texture.TextureAtlasSprite;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
import game.world.BoundingBox;
|
||||
import game.world.World;
|
||||
|
@ -100,18 +101,18 @@ public abstract class Render<T extends Entity>
|
|||
TextureMap texturemap = Game.getGame().getTextureMapBlocks();
|
||||
TextureAtlasSprite textureatlassprite = texturemap.getAtlasSprite("blocks/fire_layer_0");
|
||||
TextureAtlasSprite textureatlassprite1 = texturemap.getAtlasSprite("blocks/fire_layer_1");
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
float f = entity.width * 1.4F;
|
||||
WCF.glScalef(f, f, f);
|
||||
GL11.glScalef(f, f, f);
|
||||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
float f1 = 0.5F;
|
||||
float f2 = 0.0F;
|
||||
float f3 = entity.height / f;
|
||||
float f4 = (float)(entity.posY - entity.getEntityBoundingBox().minY);
|
||||
WCF.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(0.0F, 0.0F, -0.3F + (float)((int)f3) * 0.02F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, -0.3F + (float)((int)f3) * 0.02F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float f5 = 0.0F;
|
||||
int i = 0;
|
||||
|
@ -145,7 +146,7 @@ public abstract class Render<T extends Entity>
|
|||
}
|
||||
|
||||
Tessellator.draw();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.enableLighting();
|
||||
}
|
||||
|
||||
|
@ -325,12 +326,12 @@ public abstract class Render<T extends Entity>
|
|||
// FontRenderer fontrenderer = this.getFontRendererFromRenderManager();
|
||||
float f = 1.0f; // 1.6F;
|
||||
float f1 = 0.016666668F * f;
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x + 0.0F, (float)y + entityIn.height + 0.5F, (float)z);
|
||||
WCF.glNormal3f(0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glScalef(-f1, -f1, f1);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x + 0.0F, (float)y + entityIn.height + 0.5F, (float)z);
|
||||
GL11.glNormal3f(0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(-f1, -f1, f1);
|
||||
GlState.disableLighting();
|
||||
GlState.depthMask(false);
|
||||
// GlState.disableDepth();
|
||||
|
@ -366,7 +367,7 @@ public abstract class Render<T extends Entity>
|
|||
GlState.enableLighting();
|
||||
GlState.disableBlend();
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.renderer.layers.LayerArachnoidArmor;
|
||||
import game.renderer.model.ModelArachnoid;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderArachnoid extends RenderHumanoid
|
||||
|
@ -21,10 +22,10 @@ public class RenderArachnoid extends RenderHumanoid
|
|||
// }
|
||||
|
||||
protected void renderLayers(EntityNPC entity, float swing, float amount, float partial, float time, float dYaw, float dPitch, float scale) {
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0f, 3.0f / 16.0f, 0.0f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0f, 3.0f / 16.0f, 0.0f);
|
||||
super.renderLayers(entity, swing, amount, partial, time, dYaw, dPitch, scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public ModelArachnoid getMainModel()
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.projectile.EntityArrow;
|
||||
import game.renderer.DefaultVertexFormats;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.RenderBuffer;
|
||||
import game.renderer.Tessellator;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderArrow extends Render<EntityArrow>
|
||||
|
@ -25,10 +26,10 @@ public class RenderArrow extends Render<EntityArrow>
|
|||
{
|
||||
this.bindEntityTexture(entity);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
WCF.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 0.0F, 0.0F, 1.0F);
|
||||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
int i = 0;
|
||||
|
@ -47,20 +48,20 @@ public class RenderArrow extends Render<EntityArrow>
|
|||
if (f9 > 0.0F)
|
||||
{
|
||||
float f10 = -ExtMath.sin(f9 * 3.0F) * f9;
|
||||
WCF.glRotatef(f10, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(f10, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
WCF.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glScalef(f8, f8, f8);
|
||||
WCF.glTranslatef(-4.0F, 0.0F, 0.0F);
|
||||
WCF.glNormal3f(f8, 0.0F, 0.0F);
|
||||
GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(f8, f8, f8);
|
||||
GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(f8, 0.0F, 0.0F);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
|
||||
worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
|
||||
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
|
||||
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f7).endVertex();
|
||||
Tessellator.draw();
|
||||
WCF.glNormal3f(-f8, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(-f8, 0.0F, 0.0F);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
|
||||
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
|
||||
|
@ -70,8 +71,8 @@ public class RenderArrow extends Render<EntityArrow>
|
|||
|
||||
for (int j = 0; j < 4; ++j)
|
||||
{
|
||||
WCF.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glNormal3f(0.0F, 0.0F, f8);
|
||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(0.0F, 0.0F, f8);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
worldrenderer.pos(-8.0D, -2.0D, 0.0D).tex((double)f, (double)f2).endVertex();
|
||||
worldrenderer.pos(8.0D, -2.0D, 0.0D).tex((double)f1, (double)f2).endVertex();
|
||||
|
@ -81,7 +82,7 @@ public class RenderArrow extends Render<EntityArrow>
|
|||
}
|
||||
|
||||
GlState.disableRescaleNormal();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.animal.EntityBat;
|
||||
import game.renderer.model.ModelBat;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderBat extends RenderLiving<EntityBat>
|
||||
|
@ -29,18 +30,18 @@ public class RenderBat extends RenderLiving<EntityBat>
|
|||
*/
|
||||
protected void preRenderCallback(EntityBat entitylivingbaseIn, float partialTickTime)
|
||||
{
|
||||
WCF.glScalef(0.35F, 0.35F, 0.35F);
|
||||
GL11.glScalef(0.35F, 0.35F, 0.35F);
|
||||
}
|
||||
|
||||
protected void rotateCorpse(EntityBat bat, float p_77043_2_, float p_77043_3_, float partialTicks)
|
||||
{
|
||||
if (!bat.getIsBatHanging())
|
||||
{
|
||||
WCF.glTranslatef(0.0F, ExtMath.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, ExtMath.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glTranslatef(0.0F, -0.1F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.1F, 0.0F);
|
||||
}
|
||||
|
||||
super.rotateCorpse(bat, p_77043_2_, p_77043_3_, partialTicks);
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.Entity;
|
||||
import game.renderer.BlockRenderer;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.window.WCF;
|
||||
import game.world.State;
|
||||
|
||||
|
||||
|
@ -28,8 +29,8 @@ public class RenderBlockEntity extends Render<Entity>
|
|||
// return;
|
||||
// }
|
||||
BlockRenderer blockrendererdispatcher = Game.getGame().getBlockRendererDispatcher();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y + 0.5F, (float)z);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y + 0.5F, (float)z);
|
||||
|
||||
// if ((float)entity.fuse - partialTicks + 1.0F < 10.0F)
|
||||
// {
|
||||
|
@ -43,9 +44,9 @@ public class RenderBlockEntity extends Render<Entity>
|
|||
|
||||
// float f2 = (1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F;
|
||||
this.bindEntityTexture(entity);
|
||||
WCF.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(state, entity.getBrightness(partialTicks));
|
||||
WCF.glTranslatef(0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.0F);
|
||||
|
||||
// if (entity.fuse / 5 % 2 == 0)
|
||||
// {
|
||||
|
@ -65,7 +66,7 @@ public class RenderBlockEntity extends Render<Entity>
|
|||
// GlStateManager.enableTexture2D();
|
||||
// }
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.item.EntityBoat;
|
||||
import game.renderer.model.ModelBase;
|
||||
import game.renderer.model.ModelBoat;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderBoat extends Render<EntityBoat>
|
||||
|
@ -25,9 +26,9 @@ public class RenderBoat extends Render<EntityBoat>
|
|||
*/
|
||||
public void doRender(EntityBoat entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y + 0.25F, (float)z);
|
||||
WCF.glRotatef(180.0F - (entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks) /* entityYaw */, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y + 0.25F, (float)z);
|
||||
GL11.glRotatef(180.0F - (entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks), 0.0F, 1.0F, 0.0F);
|
||||
float f = (float)entity.getTimeSinceHit() - partialTicks;
|
||||
float f1 = (float)entity.getDamageTaken() - partialTicks;
|
||||
|
||||
|
@ -38,16 +39,16 @@ public class RenderBoat extends Render<EntityBoat>
|
|||
|
||||
if (f > 0.0F)
|
||||
{
|
||||
WCF.glRotatef(ExtMath.sin(f) * f * f1 / 10.0F * (float)entity.getForwardDirection(), 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(ExtMath.sin(f) * f * f1 / 10.0F * (float)entity.getForwardDirection(), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
float f2 = 0.75F;
|
||||
WCF.glScalef(f2, f2, f2);
|
||||
WCF.glScalef(1.0F / f2, 1.0F / f2, 1.0F / f2);
|
||||
GL11.glScalef(f2, f2, f2);
|
||||
GL11.glScalef(1.0F / f2, 1.0F / f2, 1.0F / f2);
|
||||
this.bindEntityTexture(entity);
|
||||
WCF.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GL11.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
this.modelBoat.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.projectile.EntityBullet;
|
||||
import game.renderer.DefaultVertexFormats;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.RenderBuffer;
|
||||
import game.renderer.Tessellator;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderBullet extends Render<EntityBullet>
|
||||
|
@ -21,10 +22,10 @@ public class RenderBullet extends Render<EntityBullet>
|
|||
{
|
||||
this.bindEntityTexture(entity);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
WCF.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glRotatef(entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks, 0.0F, 0.0F, 1.0F);
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
float f = 0.0F;
|
||||
float f1 = 0.5F;
|
||||
|
@ -37,17 +38,17 @@ public class RenderBullet extends Render<EntityBullet>
|
|||
float f8 = 0.05625F;
|
||||
GlState.enableRescaleNormal();
|
||||
|
||||
WCF.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glScalef(f8, f8, f8);
|
||||
WCF.glTranslatef(-4.0F, 0.0F, 0.0F);
|
||||
WCF.glNormal3f(f8, 0.0F, 0.0F);
|
||||
GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(f8, f8, f8);
|
||||
GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(f8, 0.0F, 0.0F);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
|
||||
worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
|
||||
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
|
||||
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f7).endVertex();
|
||||
Tessellator.draw();
|
||||
WCF.glNormal3f(-f8, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(-f8, 0.0F, 0.0F);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
|
||||
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
|
||||
|
@ -57,8 +58,8 @@ public class RenderBullet extends Render<EntityBullet>
|
|||
|
||||
for (int j = 0; j < 4; ++j)
|
||||
{
|
||||
WCF.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glNormal3f(0.0F, 0.0F, f8);
|
||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(0.0F, 0.0F, f8);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
worldrenderer.pos(-8.0D, -2.0D, 0.0D).tex((double)f, (double)f2).endVertex();
|
||||
worldrenderer.pos(8.0D, -2.0D, 0.0D).tex((double)f1, (double)f2).endVertex();
|
||||
|
@ -68,7 +69,7 @@ public class RenderBullet extends Render<EntityBullet>
|
|||
}
|
||||
|
||||
GlState.disableRescaleNormal();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.item.EntityCrystal;
|
||||
import game.renderer.model.ModelBase;
|
||||
import game.renderer.model.ModelCrystal;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderCrystal extends Render<EntityCrystal>
|
||||
|
@ -25,13 +26,13 @@ public class RenderCrystal extends Render<EntityCrystal>
|
|||
public void doRender(EntityCrystal entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
float f = (float)entity.innerRotation + partialTicks;
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
this.bindTexture(crystalTextures);
|
||||
float f1 = ExtMath.sin(f * 0.2F) / 2.0F + 0.5F;
|
||||
f1 = f1 * f1 + f1;
|
||||
this.modelCrystal.render(entity, 0.0F, f * 3.0F, f1 * 0.2F, 0.0F, 0.0F, 0.0625F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.projectile.EntityDie;
|
||||
import game.renderer.blockmodel.Transforms.Camera;
|
||||
import game.renderer.model.ModelDie;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.window.WCF;
|
||||
|
||||
public class RenderDie extends Render<EntityDie>
|
||||
{
|
||||
|
@ -25,16 +26,16 @@ public class RenderDie extends Render<EntityDie>
|
|||
public void doRender(EntityDie entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
// BlockRendererDispatcher blockrendererdispatcher = Game.getClient().getBlockRendererDispatcher();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y + 0.05F, (float)z);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y + 0.05F, (float)z);
|
||||
this.bindEntityTexture(entity);
|
||||
if(entity.getValue() == 0)
|
||||
WCF.glRotatef((float)((entity.ticksExisted % 10) * (360 / 10)), 0.3f, 0.4f, 0.1f);
|
||||
GL11.glRotatef((float)((entity.ticksExisted % 10) * (360 / 10)), 0.3f, 0.4f, 0.1f);
|
||||
// GlState.translate(-0.05F, -0.05F, 0.05F);
|
||||
WCF.glScalef(0.5f, 0.5f, 0.5f);
|
||||
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||
Game.getGame().getRenderItem().renderItem(entity.getStack(), Camera.GROUND);
|
||||
// blockrendererdispatcher.renderBlockBrightness(Blocks.planks.getDefaultState(), entity.getBrightness(partialTicks));
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.animal.EntityDragon;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.layers.LayerEnderDragonEyes;
|
||||
import game.renderer.model.ModelDragon;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderDragon extends RenderLiving<EntityDragon>
|
||||
|
@ -27,9 +28,9 @@ public class RenderDragon extends RenderLiving<EntityDragon>
|
|||
{
|
||||
float f = (float)bat.getMovementOffsets(7, partialTicks)[0];
|
||||
float f1 = (float)(bat.getMovementOffsets(5, partialTicks)[1] - bat.getMovementOffsets(10, partialTicks)[1]);
|
||||
WCF.glRotatef(-f, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glTranslatef(0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-f, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.0F);
|
||||
|
||||
if (bat.deathTime > 0)
|
||||
{
|
||||
|
@ -41,7 +42,7 @@ public class RenderDragon extends RenderLiving<EntityDragon>
|
|||
f2 = 1.0F;
|
||||
}
|
||||
|
||||
WCF.glRotatef(f2 * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(f2 * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderEntity extends Render<Entity>
|
||||
|
@ -16,9 +17,9 @@ public class RenderEntity extends Render<Entity>
|
|||
*/
|
||||
public void doRender(Entity entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
renderOffsetAABB(entity.getEntityBoundingBox(), x - entity.lastTickPosX, y - entity.lastTickPosY, z - entity.lastTickPosZ);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.item.EntityItem;
|
||||
import game.item.Item;
|
||||
import game.item.ItemStack;
|
||||
|
@ -9,7 +11,6 @@ import game.renderer.blockmodel.Transforms;
|
|||
import game.renderer.texture.TextureMap;
|
||||
import game.rng.Random;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class RenderEntityItem extends Render<EntityItem>
|
||||
{
|
||||
|
@ -40,12 +41,12 @@ public class RenderEntityItem extends Render<EntityItem>
|
|||
float f = 0.25F;
|
||||
float f1 = ExtMath.sin(((float)itemIn.getAge() + p_177077_8_) / 10.0F + itemIn.hoverStart) * 0.1F + 0.1F;
|
||||
float f2 = p_177077_9_.getItemCameraTransforms().get(Transforms.Camera.GROUND).scale.y;
|
||||
WCF.glTranslatef((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_);
|
||||
GL11.glTranslatef((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_);
|
||||
|
||||
if (flag || this.renderManager.gm != null)
|
||||
{
|
||||
float f3 = (((float)itemIn.getAge() + p_177077_8_) / 20.0F + itemIn.hoverStart) * (180F / (float)Math.PI);
|
||||
WCF.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (!flag)
|
||||
|
@ -53,7 +54,7 @@ public class RenderEntityItem extends Render<EntityItem>
|
|||
float f6 = -0.0F * (float)(i - 1) * 0.5F;
|
||||
float f4 = -0.0F * (float)(i - 1) * 0.5F;
|
||||
float f5 = -0.046875F * (float)(i - 1) * 0.5F;
|
||||
WCF.glTranslatef(f6, f4, f5);
|
||||
GL11.glTranslatef(f6, f4, f5);
|
||||
}
|
||||
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
@ -106,7 +107,7 @@ public class RenderEntityItem extends Render<EntityItem>
|
|||
GlState.alphaFunc(516, 0.1F);
|
||||
GlState.enableBlend();
|
||||
GlState.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
IBakedModel ibakedmodel = this.itemRenderer.getItemModelMesher().getItemModel(itemstack);
|
||||
int i = this.func_177077_a(entity, x, y, z, partialTicks, ibakedmodel);
|
||||
|
||||
|
@ -114,35 +115,35 @@ public class RenderEntityItem extends Render<EntityItem>
|
|||
{
|
||||
if (ibakedmodel.isGui3d())
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (j > 0)
|
||||
{
|
||||
float f = (this.field_177079_e.floatv() * 2.0F - 1.0F) * 0.15F;
|
||||
float f1 = (this.field_177079_e.floatv() * 2.0F - 1.0F) * 0.15F;
|
||||
float f2 = (this.field_177079_e.floatv() * 2.0F - 1.0F) * 0.15F;
|
||||
WCF.glTranslatef(f, f1, f2);
|
||||
GL11.glTranslatef(f, f1, f2);
|
||||
}
|
||||
|
||||
WCF.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
ibakedmodel.getItemCameraTransforms().apply(Transforms.Camera.GROUND);
|
||||
this.itemRenderer.renderItem(itemstack, ibakedmodel);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
ibakedmodel.getItemCameraTransforms().apply(Transforms.Camera.GROUND);
|
||||
this.itemRenderer.renderItem(itemstack, ibakedmodel);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
float f3 = ibakedmodel.getItemCameraTransforms().ground.scale.x;
|
||||
float f4 = ibakedmodel.getItemCameraTransforms().ground.scale.y;
|
||||
float f5 = ibakedmodel.getItemCameraTransforms().ground.scale.z;
|
||||
WCF.glTranslatef(0.0F * f3, 0.0F * f4, 0.046875F * f5);
|
||||
GL11.glTranslatef(0.0F * f3, 0.0F * f4, 0.046875F * f5);
|
||||
}
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.disableRescaleNormal();
|
||||
GlState.disableBlend();
|
||||
this.bindEntityTexture(entity);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.block.Block;
|
||||
import game.entity.item.EntityFalling;
|
||||
|
@ -10,7 +12,6 @@ import game.renderer.GlState;
|
|||
import game.renderer.RenderBuffer;
|
||||
import game.renderer.Tessellator;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
import game.world.State;
|
||||
import game.world.World;
|
||||
|
@ -40,8 +41,8 @@ public class RenderFallingBlock extends Render<EntityFalling>
|
|||
{
|
||||
if (block.getRenderType() == 3)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GlState.disableLighting();
|
||||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
|
@ -56,7 +57,7 @@ public class RenderFallingBlock extends Render<EntityFalling>
|
|||
worldrenderer.setTranslation(0.0D, 0.0D, 0.0D);
|
||||
Tessellator.draw();
|
||||
GlState.enableLighting();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.projectile.EntityProjectile;
|
||||
import game.init.Items;
|
||||
|
@ -9,7 +11,6 @@ import game.renderer.RenderBuffer;
|
|||
import game.renderer.Tessellator;
|
||||
import game.renderer.texture.TextureAtlasSprite;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderFireball extends Render<EntityProjectile>
|
||||
|
@ -27,11 +28,11 @@ public class RenderFireball extends Render<EntityProjectile>
|
|||
*/
|
||||
public void doRender(EntityProjectile entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.bindEntityTexture(entity);
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GlState.enableRescaleNormal();
|
||||
WCF.glScalef(this.scale, this.scale, this.scale);
|
||||
GL11.glScalef(this.scale, this.scale, this.scale);
|
||||
TextureAtlasSprite textureatlassprite = Game.getGame().getRenderItem().getItemModelMesher().getParticleIcon(Items.fire_charge);
|
||||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
|
@ -42,8 +43,8 @@ public class RenderFireball extends Render<EntityProjectile>
|
|||
float f4 = 1.0F;
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.25F;
|
||||
WCF.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
|
||||
worldrenderer.pos(-0.5D, -0.25D, 0.0D).tex((double)f, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
worldrenderer.pos(0.5D, -0.25D, 0.0D).tex((double)f1, (double)f3).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
|
@ -51,7 +52,7 @@ public class RenderFireball extends Render<EntityProjectile>
|
|||
worldrenderer.pos(-0.5D, 0.75D, 0.0D).tex((double)f, (double)f2).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
Tessellator.draw();
|
||||
GlState.disableRescaleNormal();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.projectile.EntityHook;
|
||||
import game.renderer.DefaultVertexFormats;
|
||||
|
@ -8,7 +10,6 @@ import game.renderer.RenderBuffer;
|
|||
import game.renderer.Tessellator;
|
||||
import game.renderer.particle.EffectRenderer;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.Vec3;
|
||||
|
||||
public class RenderFish extends Render<EntityHook>
|
||||
|
@ -23,10 +24,10 @@ public class RenderFish extends Render<EntityHook>
|
|||
*/
|
||||
public void doRender(EntityHook entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GlState.enableRescaleNormal();
|
||||
WCF.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
this.bindEntityTexture(entity);
|
||||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
|
@ -39,8 +40,8 @@ public class RenderFish extends Render<EntityHook>
|
|||
float f4 = 1.0F;
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.5F;
|
||||
WCF.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
|
||||
worldrenderer.pos(-0.5D, -0.5D, 0.0D).tex(0.0625D, 0.1875D).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
worldrenderer.pos(0.5D, -0.5D, 0.0D).tex(0.125D, 0.1875D).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
|
@ -48,7 +49,7 @@ public class RenderFish extends Render<EntityHook>
|
|||
worldrenderer.pos(-0.5D, 0.5D, 0.0D).tex(0.0625D, 0.125D).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
Tessellator.draw();
|
||||
GlState.disableRescaleNormal();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if (entity.angler != null)
|
||||
{
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.projectile.EntityBox;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.model.ModelHead;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderFlyingBox extends Render<EntityBox>
|
||||
|
@ -39,19 +40,19 @@ public class RenderFlyingBox extends Render<EntityBox>
|
|||
*/
|
||||
public void doRender(EntityBox entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GlState.disableCull();
|
||||
float f = this.func_82400_a(entity.prevYaw, entity.rotYaw, partialTicks);
|
||||
float f1 = entity.prevPitch + (entity.rotPitch - entity.prevPitch) * partialTicks;
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
WCF.glRotatef((float)(entity.ticksExisted % 100) * 360.0f / 100.0f, 0.3f, 0.4f, 0.1f);
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glRotatef((float)(entity.ticksExisted % 100) * 360.0f / 100.0f, 0.3f, 0.4f, 0.1f);
|
||||
float f2 = 0.0625F;
|
||||
GlState.enableRescaleNormal();
|
||||
WCF.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GL11.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GlState.enableAlpha();
|
||||
this.bindEntityTexture(entity);
|
||||
this.boxModel.render(entity, 0.0F, 0.0F, 0.0F, f, f1, f2);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,13 +2,14 @@ package game.renderer.entity;
|
|||
|
||||
import java.util.Set;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.animal.EntityHorse;
|
||||
import game.renderer.model.ModelHorse;
|
||||
import game.renderer.texture.LayeredTexture;
|
||||
import game.window.WCF;
|
||||
|
||||
public class RenderHorse extends RenderLiving<EntityHorse>
|
||||
{
|
||||
|
@ -42,7 +43,7 @@ public class RenderHorse extends RenderLiving<EntityHorse>
|
|||
f *= 0.92F;
|
||||
}
|
||||
|
||||
WCF.glScalef(f, f, f);
|
||||
GL11.glScalef(f, f, f);
|
||||
super.preRenderCallback(entitylivingbaseIn, partialTickTime);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.item.ItemAction;
|
||||
import game.item.ItemStack;
|
||||
|
@ -13,7 +15,6 @@ import game.renderer.layers.LayerHeldItem;
|
|||
import game.renderer.layers.LayerPowerRods;
|
||||
import game.renderer.model.ModelBiped;
|
||||
import game.renderer.model.ModelHumanoid;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderHumanoid extends RenderNpc
|
||||
|
@ -176,7 +177,7 @@ public class RenderHumanoid extends RenderNpc
|
|||
// SKC.glScalef(f2, f3, f2);
|
||||
// }
|
||||
float f = entitylivingbaseIn.getRenderScale(); // 0.9375F;
|
||||
WCF.glScalef(f, f, f);
|
||||
GL11.glScalef(f, f, f);
|
||||
}
|
||||
|
||||
// protected int getColorMultiplier(EntityNPC entitylivingbaseIn, float lightBrightness, float partialTickTime)
|
||||
|
|
|
@ -2,6 +2,8 @@ package game.renderer.entity;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.init.Items;
|
||||
|
@ -20,7 +22,6 @@ import game.renderer.blockmodel.Transforms;
|
|||
import game.renderer.texture.TextureManager;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.renderer.tileentity.TileEntityItemStackRenderer;
|
||||
import game.window.WCF;
|
||||
import game.world.Facing;
|
||||
import game.world.Vec3i;
|
||||
|
||||
|
@ -87,20 +88,20 @@ public class RenderItem
|
|||
{
|
||||
if (stack != null)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
if (model.isBuiltInRenderer())
|
||||
{
|
||||
WCF.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlState.enableRescaleNormal();
|
||||
TileEntityItemStackRenderer.instance.renderByItem(stack);
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
this.renderModel(model, stack);
|
||||
|
||||
if (stack.hasEffect())
|
||||
|
@ -109,7 +110,7 @@ public class RenderItem
|
|||
}
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,22 +121,22 @@ public class RenderItem
|
|||
GlState.disableLighting();
|
||||
GlState.blendFunc(768, 1);
|
||||
this.textureManager.bindTexture(RES_ITEM_GLINT);
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(8.0F, 8.0F, 8.0F);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(8.0F, 8.0F, 8.0F);
|
||||
float f = (float)(System.currentTimeMillis() % 3000L) / 3000.0F / 8.0F;
|
||||
WCF.glTranslatef(f, 0.0F, 0.0F);
|
||||
WCF.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(f, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
|
||||
this.renderModel(model, -8372020);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(8.0F, 8.0F, 8.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(8.0F, 8.0F, 8.0F);
|
||||
float f1 = (float)(System.currentTimeMillis() % 4873L) / 4873.0F / 8.0F;
|
||||
WCF.glTranslatef(-f1, 0.0F, 0.0F);
|
||||
WCF.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-f1, 0.0F, 0.0F);
|
||||
GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
|
||||
this.renderModel(model, -8372020);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glMatrixMode(5888);
|
||||
GlState.blendFunc(770, 771);
|
||||
GlState.enableLighting();
|
||||
GlState.depthFunc(515);
|
||||
|
@ -199,7 +200,7 @@ public class RenderItem
|
|||
|
||||
if (!flag)
|
||||
{
|
||||
WCF.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
}
|
||||
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
@ -268,7 +269,7 @@ public class RenderItem
|
|||
GlState.alphaFunc(516, 0.1F);
|
||||
GlState.enableBlend();
|
||||
GlState.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
Transforms itemcameratransforms = model.getItemCameraTransforms();
|
||||
itemcameratransforms.apply(cameraTransformType);
|
||||
|
||||
|
@ -279,7 +280,7 @@ public class RenderItem
|
|||
|
||||
this.renderItem(stack, model);
|
||||
GlState.cullFace(1029);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.disableRescaleNormal();
|
||||
GlState.disableBlend();
|
||||
this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
||||
|
@ -299,7 +300,7 @@ public class RenderItem
|
|||
private void renderItemIntoGUI(ItemStack stack, int x, int y)
|
||||
{
|
||||
IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
||||
// this.textureManager.getTexture(TextureMap.locationBlocksTexture).unsetMipmap();
|
||||
GlState.enableRescaleNormal();
|
||||
|
@ -314,29 +315,29 @@ public class RenderItem
|
|||
GlState.disableAlpha();
|
||||
GlState.disableRescaleNormal();
|
||||
GlState.disableLighting();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
|
||||
// this.textureManager.getTexture(TextureMap.locationBlocksTexture).restoreLastMipmap();
|
||||
}
|
||||
|
||||
private void setupGuiTransform(int xPosition, int yPosition, boolean isGui3d)
|
||||
{
|
||||
WCF.glTranslatef((float)xPosition, (float)yPosition, 100.0F + this.zLevel);
|
||||
WCF.glTranslatef(8.0F, 8.0F, 0.0F);
|
||||
WCF.glScalef(1.0F, 1.0F, -1.0F);
|
||||
WCF.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef((float)xPosition, (float)yPosition, 100.0F + this.zLevel);
|
||||
GL11.glTranslatef(8.0F, 8.0F, 0.0F);
|
||||
GL11.glScalef(1.0F, 1.0F, -1.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
if (isGui3d)
|
||||
{
|
||||
WCF.glScalef(40.0F, 40.0F, 40.0F);
|
||||
WCF.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(40.0F, 40.0F, 40.0F);
|
||||
GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
|
||||
GlState.enableLighting();
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glScalef(64.0F, 64.0F, 64.0F);
|
||||
WCF.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(64.0F, 64.0F, 64.0F);
|
||||
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
GlState.disableLighting();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.item.Item;
|
||||
import game.item.ItemStack;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.blockmodel.Transforms;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderItemEntity<T extends Entity> extends Render<T>
|
||||
|
@ -23,16 +24,16 @@ public class RenderItemEntity<T extends Entity> extends Render<T>
|
|||
|
||||
public void doRender(T entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GlState.enableRescaleNormal();
|
||||
WCF.glScalef(0.5F, 0.5F, 0.5F);
|
||||
WCF.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
this.bindTexture(TextureMap.locationBlocksTexture);
|
||||
this.itemRenderer.renderItem(this.getStack(entity), Transforms.Camera.GROUND);
|
||||
GlState.disableRescaleNormal();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.item.EntityLeashKnot;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.model.ModelLeashKnot;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderLeashKnot extends Render<EntityLeashKnot>
|
||||
|
@ -21,16 +22,16 @@ public class RenderLeashKnot extends Render<EntityLeashKnot>
|
|||
*/
|
||||
public void doRender(EntityLeashKnot entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GlState.disableCull();
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
float f = 0.0625F;
|
||||
GlState.enableRescaleNormal();
|
||||
WCF.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GL11.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GlState.enableAlpha();
|
||||
this.bindEntityTexture(entity);
|
||||
this.leashKnotModel.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, f);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import game.renderer.GlState;
|
|||
import game.renderer.RenderBuffer;
|
||||
import game.renderer.Tessellator;
|
||||
import game.renderer.model.ModelBase;
|
||||
import game.window.WCF;
|
||||
|
||||
public abstract class RenderLiving<T extends EntityLiving> extends RendererLivingEntity<T> {
|
||||
public RenderLiving(RenderManager manager, ModelBase model) {
|
||||
|
@ -47,7 +46,7 @@ public abstract class RenderLiving<T extends EntityLiving> extends RendererLivin
|
|||
int l = entity.getBrightnessForRender(partial);
|
||||
int a = l % 65536;
|
||||
int b = l / 65536;
|
||||
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)a / 1.0F, (float)b / 1.0F);
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)a / 1.0F, (float)b / 1.0F);
|
||||
}
|
||||
|
||||
private static double interpolateValue(double start, double end, double pct) {
|
||||
|
|
|
@ -17,7 +17,6 @@ import game.renderer.RenderBuffer;
|
|||
import game.renderer.RenderGlobal;
|
||||
import game.renderer.Tessellator;
|
||||
import game.renderer.texture.TextureManager;
|
||||
import game.window.WCF;
|
||||
import game.world.BoundingBox;
|
||||
import game.world.Vec3;
|
||||
import game.world.World;
|
||||
|
@ -235,7 +234,7 @@ public class RenderManager
|
|||
|
||||
int j = i % 65536;
|
||||
int k = i / 65536;
|
||||
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 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);
|
||||
}
|
||||
|
@ -252,7 +251,7 @@ public class RenderManager
|
|||
int i = entityIn.getBrightnessForRender(partialTicks);
|
||||
int j = i % 65536;
|
||||
int k = i / 65536;
|
||||
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
render.renderName(entityIn, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.item.EntityCart;
|
||||
import game.renderer.GlState;
|
||||
|
@ -7,7 +9,6 @@ import game.renderer.model.ModelBase;
|
|||
import game.renderer.model.ModelMinecart;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.State;
|
||||
import game.world.Vec3;
|
||||
|
||||
|
@ -30,14 +31,14 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
|
|||
public void doRender(T entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
float entityYaw = entity.prevYaw + (entity.rotYaw - entity.prevYaw) * partialTicks;
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.bindEntityTexture(entity);
|
||||
long i = (long)entity.getId() * 493286711L;
|
||||
i = i * i * 4392167121L + i * 98761L;
|
||||
float f = (((float)(i >> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
|
||||
float f1 = (((float)(i >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
|
||||
float f2 = (((float)(i >> 24 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
|
||||
WCF.glTranslatef(f, f1, f2);
|
||||
GL11.glTranslatef(f, f1, f2);
|
||||
double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks;
|
||||
double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks;
|
||||
double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTicks;
|
||||
|
@ -73,9 +74,9 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
|
|||
}
|
||||
}
|
||||
|
||||
WCF.glTranslatef((float)x, (float)y + 0.375F, (float)z);
|
||||
WCF.glRotatef(180.0F - entityYaw, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-f3, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef((float)x, (float)y + 0.375F, (float)z);
|
||||
GL11.glRotatef(180.0F - entityYaw, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-f3, 0.0F, 0.0F, 1.0F);
|
||||
float f5 = (float)entity.getRollingAmplitude() - partialTicks;
|
||||
float f6 = (float)entity.getDamage() - partialTicks;
|
||||
|
||||
|
@ -86,7 +87,7 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
|
|||
|
||||
if (f5 > 0.0F)
|
||||
{
|
||||
WCF.glRotatef(ExtMath.sin(f5) * f5 * f6 / 10.0F * (float)entity.getRollingDirection(), 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(ExtMath.sin(f5) * f5 * f6 / 10.0F * (float)entity.getRollingDirection(), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
int j = entity.getDisplayTileOffset();
|
||||
|
@ -94,20 +95,20 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
|
|||
|
||||
if (iblockstate.getBlock().getRenderType() != -1)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.bindTexture(TextureMap.locationBlocksTexture);
|
||||
float f4 = 0.75F;
|
||||
WCF.glScalef(f4, f4, f4);
|
||||
WCF.glTranslatef(-0.5F, (float)(j - 8) / 16.0F, 0.5F);
|
||||
GL11.glScalef(f4, f4, f4);
|
||||
GL11.glTranslatef(-0.5F, (float)(j - 8) / 16.0F, 0.5F);
|
||||
this.func_180560_a(entity, partialTicks, iblockstate);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.bindEntityTexture(entity);
|
||||
}
|
||||
|
||||
WCF.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GL11.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
this.modelMinecart.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
@ -121,8 +122,8 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
|
|||
|
||||
protected void func_180560_a(T minecart, float partialTicks, State state)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
Game.getGame().getBlockRendererDispatcher().renderBlockBrightness(state, minecart.getBrightness(partialTicks));
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.animal.EntityOcelot;
|
||||
import game.renderer.model.ModelBase;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderOcelot extends RenderLiving<EntityOcelot>
|
||||
|
@ -49,7 +50,7 @@ public class RenderOcelot extends RenderLiving<EntityOcelot>
|
|||
|
||||
if (entitylivingbaseIn.isTamed())
|
||||
{
|
||||
WCF.glScalef(0.8F, 0.8F, 0.8F);
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.entity.npc.EntitySlime;
|
||||
import game.renderer.layers.LayerSlimeGel;
|
||||
import game.renderer.model.ModelSlime;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderSlime extends RenderNpc
|
||||
|
@ -24,7 +25,7 @@ public class RenderSlime extends RenderNpc
|
|||
f1 = (slime.prevSquishFactor + (slime.squishFactor - slime.prevSquishFactor) * partialTickTime) / (f * 0.5F + 1.0F);
|
||||
}
|
||||
float f2 = 1.0F / (f1 + 1.0F);
|
||||
WCF.glScalef(f2 * f, 1.0F / f2 * f, f2 * f);
|
||||
GL11.glScalef(f2 * f, 1.0F / f2 * f, f2 * f);
|
||||
}
|
||||
|
||||
// protected String getEntityTexture(EntityNPC entity)
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.item.ItemAction;
|
||||
import game.item.ItemStack;
|
||||
import game.renderer.layers.LayerArrow;
|
||||
import game.renderer.layers.LayerHeldItem;
|
||||
import game.renderer.model.ModelSpaceMarine;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderSpaceMarine extends RenderNpc
|
||||
|
@ -81,7 +82,7 @@ public class RenderSpaceMarine extends RenderNpc
|
|||
protected void preRenderCallback(EntityNPC entitylivingbaseIn, float partialTickTime)
|
||||
{
|
||||
float f = entitylivingbaseIn.getRenderScale(); // 0.9375F;
|
||||
WCF.glScalef(f, f, f);
|
||||
GL11.glScalef(f, f, f);
|
||||
}
|
||||
|
||||
// public void renderPlayerArm(EntityNPC entity)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.animal.EntitySquid;
|
||||
import game.renderer.model.ModelBase;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderSquid extends RenderLiving<EntitySquid>
|
||||
|
@ -26,11 +27,11 @@ public class RenderSquid extends RenderLiving<EntitySquid>
|
|||
{
|
||||
float f = bat.prevSquidPitch + (bat.squidPitch - bat.prevSquidPitch) * partialTicks;
|
||||
float f1 = bat.prevSquidYaw + (bat.squidYaw - bat.prevSquidYaw) * partialTicks;
|
||||
WCF.glTranslatef(0.0F, 0.5F, 0.0F);
|
||||
WCF.glRotatef(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(f, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(f1, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(0.0F, -1.2F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.5F, 0.0F);
|
||||
GL11.glRotatef(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(f, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(f1, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -1.2F, 0.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.item.EntityTntCart;
|
||||
import game.init.Blocks;
|
||||
import game.renderer.BlockRenderer;
|
||||
import game.renderer.GlState;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.State;
|
||||
|
||||
public class RenderTntMinecart extends RenderMinecart<EntityTntCart>
|
||||
|
@ -27,7 +28,7 @@ public class RenderTntMinecart extends RenderMinecart<EntityTntCart>
|
|||
f = f * f;
|
||||
f = f * f;
|
||||
float f1 = 1.0F + f * 0.3F;
|
||||
WCF.glScalef(f1, f1, f1);
|
||||
GL11.glScalef(f1, f1, f1);
|
||||
}
|
||||
|
||||
super.func_180560_a(minecart, partialTicks, state);
|
||||
|
@ -40,9 +41,9 @@ public class RenderTntMinecart extends RenderMinecart<EntityTntCart>
|
|||
GlState.enableBlend();
|
||||
GlState.blendFunc(770, 772);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, (1.0F - ((float)i - partialTicks + 1.0F) / 100.0F) * 0.8F);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getState(), 1.0F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlState.disableBlend();
|
||||
GlState.enableLighting();
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.block.BlockTNT;
|
||||
import game.entity.item.EntityTnt;
|
||||
|
@ -8,7 +10,6 @@ import game.renderer.BlockRenderer;
|
|||
import game.renderer.GlState;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderTntPrimed extends Render<EntityTnt>
|
||||
|
@ -25,8 +26,8 @@ public class RenderTntPrimed extends Render<EntityTnt>
|
|||
public void doRender(EntityTnt entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
BlockRenderer blockrendererdispatcher = Game.getGame().getBlockRendererDispatcher();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y + 0.5F, (float)z);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y + 0.5F, (float)z);
|
||||
|
||||
if ((float)entity.fuse - partialTicks + 1.0F < 10.0F)
|
||||
{
|
||||
|
@ -35,14 +36,14 @@ public class RenderTntPrimed extends Render<EntityTnt>
|
|||
f = f * f;
|
||||
f = f * f;
|
||||
float f1 = 1.0F + f * 0.3F;
|
||||
WCF.glScalef(f1, f1, f1);
|
||||
GL11.glScalef(f1, f1, f1);
|
||||
}
|
||||
|
||||
float f2 = (1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F;
|
||||
this.bindEntityTexture(entity);
|
||||
WCF.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getState().withProperty(BlockTNT.POWER, Integer.valueOf(entity.explosionSize)), entity.getBrightness(partialTicks));
|
||||
WCF.glTranslatef(0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.0F);
|
||||
|
||||
if (entity.fuse / 5 % 2 == 0)
|
||||
{
|
||||
|
@ -62,7 +63,7 @@ public class RenderTntPrimed extends Render<EntityTnt>
|
|||
GlState.enableTexture2D();
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package game.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import game.entity.item.EntityXp;
|
||||
|
@ -8,7 +9,6 @@ import game.renderer.GlState;
|
|||
import game.renderer.RenderBuffer;
|
||||
import game.renderer.Tessellator;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class RenderXpOrb extends Render<EntityXp>
|
||||
|
@ -27,8 +27,8 @@ public class RenderXpOrb extends Render<EntityXp>
|
|||
*/
|
||||
public void doRender(EntityXp entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
this.bindEntityTexture(entity);
|
||||
int i = entity.getXpValue();
|
||||
float f = (float)(i % 4 * 16 + 0) / 64.0F;
|
||||
|
@ -41,17 +41,17 @@ public class RenderXpOrb extends Render<EntityXp>
|
|||
int j = entity.getBrightnessForRender(partialTicks);
|
||||
int k = j % 65536;
|
||||
int l = j / 65536;
|
||||
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float f8 = 255.0F;
|
||||
float f9 = ((float)entity.xpColor + partialTicks) / 2.0F;
|
||||
l = (int)((ExtMath.sin(f9 + 0.0F) + 1.0F) * 0.5F * 255.0F);
|
||||
int i1 = 255;
|
||||
int j1 = (int)((ExtMath.sin(f9 + 4.1887903F) + 1.0F) * 0.1F * 255.0F);
|
||||
WCF.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
float f7 = 0.3F;
|
||||
WCF.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
|
||||
|
@ -62,7 +62,7 @@ public class RenderXpOrb extends Render<EntityXp>
|
|||
Tessellator.draw();
|
||||
GlState.disableBlend();
|
||||
GlState.disableRescaleNormal();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.nio.ByteOrder;
|
|||
import java.nio.FloatBuffer;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
@ -24,7 +25,6 @@ import game.renderer.layers.LayerRenderer;
|
|||
import game.renderer.model.ModelBase;
|
||||
import game.renderer.texture.DynamicTexture;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public abstract class RendererLivingEntity<T extends EntityLiving> extends Render<T>
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
*/
|
||||
public void doRender(T entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GlState.disableCull();
|
||||
this.mainModel.swingProgress = this.getSwingProgress(entity, partialTicks);
|
||||
this.mainModel.isRiding = entity.isRiding();
|
||||
|
@ -130,10 +130,10 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
float f8 = this.handleRotationFloat(entity, partialTicks);
|
||||
this.rotateCorpse(entity, f8, f, partialTicks);
|
||||
GlState.enableRescaleNormal();
|
||||
WCF.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GL11.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
this.preRenderCallback(entity, partialTicks);
|
||||
float f4 = 0.0625F;
|
||||
WCF.glTranslatef(0.0F, -1.5078125F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -1.5078125F, 0.0F);
|
||||
float f5 = entity.prevLswingAmount + (entity.lswingAmount - entity.prevLswingAmount) * partialTicks;
|
||||
float f6 = entity.limbSwing - entity.lswingAmount * (1.0F - partialTicks);
|
||||
|
||||
|
@ -190,7 +190,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
GlState.enableTexture2D();
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||
GlState.enableCull();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if (!this.renderOutlines)
|
||||
{
|
||||
|
@ -257,7 +257,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
|
||||
if (ghost)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 0.3F);
|
||||
// GlState.color(entity.getRenderColor() | (vis ? 0x50000000 : 0x26000000));
|
||||
GlState.depthMask(false);
|
||||
|
@ -277,7 +277,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
{
|
||||
GlState.disableBlend();
|
||||
GlState.alphaFunc(516, 0.1F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.depthMask(true);
|
||||
}
|
||||
// }
|
||||
|
@ -416,12 +416,12 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
*/
|
||||
protected void renderLivingAt(T entityLivingBaseIn, double x, double y, double z)
|
||||
{
|
||||
WCF.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
}
|
||||
|
||||
protected void rotateCorpse(T bat, float p_77043_2_, float p_77043_3_, float partialTicks)
|
||||
{
|
||||
WCF.glRotatef(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
if (bat.deathTime > 0)
|
||||
{
|
||||
|
@ -433,7 +433,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
f = 1.0F;
|
||||
}
|
||||
|
||||
WCF.glRotatef(f * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(f * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -441,8 +441,8 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
|
||||
if (s != null && (s.startsWith("Australia") || s.startsWith("Australien"))) // && (!(bat.isPlayer()) || ((EntityNPC)bat).isWearing(ModelPart.CAPE)))
|
||||
{
|
||||
WCF.glTranslatef(0.0F, bat.height + 0.1F, 0.0F);
|
||||
WCF.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, bat.height + 0.1F, 0.0F);
|
||||
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -528,10 +528,10 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
float f4 = (float)(crystal.posZ - entity.posZ - (entity.prevZ - entity.posZ) * (double)(1.0F - p_180574_8_));
|
||||
float f5 = ExtMath.sqrtf(f2 * f2 + f4 * f4);
|
||||
float f6 = ExtMath.sqrtf(f2 * f2 + f3 * f3 + f4 * f4);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)p_180574_2_, (float)p_180574_4_ + 2.0F, (float)p_180574_6_);
|
||||
WCF.glRotatef((float)(-Math.atan2((double)f4, (double)f2)) * 180.0F / (float)Math.PI - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef((float)(-Math.atan2((double)f5, (double)f3)) * 180.0F / (float)Math.PI - 90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)p_180574_2_, (float)p_180574_4_ + 2.0F, (float)p_180574_6_);
|
||||
GL11.glRotatef((float)(-Math.atan2((double)f4, (double)f2)) * 180.0F / (float)Math.PI - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef((float)(-Math.atan2((double)f5, (double)f3)) * 180.0F / (float)Math.PI - 90.0F, 1.0F, 0.0F, 0.0F);
|
||||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
ItemRenderer.disableStandardItemLighting();
|
||||
|
@ -556,7 +556,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
GlState.enableCull();
|
||||
GlState.shadeModel(7424);
|
||||
ItemRenderer.enableStandardItemLighting();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
static
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.layers;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.item.ItemArmor;
|
||||
import game.item.ItemStack;
|
||||
|
@ -7,7 +9,6 @@ import game.renderer.GlState;
|
|||
import game.renderer.entity.RendererLivingEntity;
|
||||
import game.renderer.model.ModelArmor;
|
||||
import game.renderer.model.ModelBiped;
|
||||
import game.window.WCF;
|
||||
|
||||
public class LayerArmor implements LayerRenderer<EntityLiving>
|
||||
{
|
||||
|
@ -117,19 +118,19 @@ public class LayerArmor implements LayerRenderer<EntityLiving>
|
|||
GlState.blendFunc(768, 1);
|
||||
float f2 = 0.76F;
|
||||
GlState.color(0.5F * f2, 0.25F * f2, 0.8F * f2, 1.0F);
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glLoadIdentity();
|
||||
float f3 = 0.33333334F;
|
||||
WCF.glScalef(f3, f3, f3);
|
||||
WCF.glRotatef(30.0F - (float)i * 60.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glTranslatef(0.0F, f * (0.001F + (float)i * 0.003F) * 20.0F, 0.0F);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glScalef(f3, f3, f3);
|
||||
GL11.glRotatef(30.0F - (float)i * 60.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, f * (0.001F + (float)i * 0.003F) * 20.0F, 0.0F);
|
||||
GL11.glMatrixMode(5888);
|
||||
modelbaseIn.render(entitylivingbaseIn, p_177183_3_, p_177183_4_, p_177183_6_, p_177183_7_, p_177183_8_, scale);
|
||||
}
|
||||
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glLoadIdentity();
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(5888);
|
||||
GlState.enableLighting();
|
||||
GlState.depthMask(true);
|
||||
GlState.depthFunc(515);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.layers;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.projectile.EntityArrow;
|
||||
import game.entity.types.EntityLiving;
|
||||
|
@ -9,7 +11,6 @@ import game.renderer.model.ModelBox;
|
|||
import game.renderer.model.ModelRenderer;
|
||||
import game.rng.Random;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class LayerArrow implements LayerRenderer<EntityLiving>
|
||||
{
|
||||
|
@ -32,7 +33,7 @@ public class LayerArrow implements LayerRenderer<EntityLiving>
|
|||
|
||||
for (int j = 0; j < i; ++j)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
ModelRenderer modelrenderer = this.field_177168_a.getMainModel().getRandomModelBox(random);
|
||||
ModelBox modelbox = (ModelBox)modelrenderer.cubeList.get(random.zrange(modelrenderer.cubeList.size()));
|
||||
modelrenderer.postRender(0.0625F);
|
||||
|
@ -42,7 +43,7 @@ public class LayerArrow implements LayerRenderer<EntityLiving>
|
|||
float f3 = (modelbox.posX1 + (modelbox.posX2 - modelbox.posX1) * f) / 16.0F;
|
||||
float f4 = (modelbox.posY1 + (modelbox.posY2 - modelbox.posY1) * f1) / 16.0F;
|
||||
float f5 = (modelbox.posZ1 + (modelbox.posZ2 - modelbox.posZ1) * f2) / 16.0F;
|
||||
WCF.glTranslatef(f3, f4, f5);
|
||||
GL11.glTranslatef(f3, f4, f5);
|
||||
f = f * 2.0F - 1.0F;
|
||||
f1 = f1 * 2.0F - 1.0F;
|
||||
f2 = f2 * 2.0F - 1.0F;
|
||||
|
@ -56,7 +57,7 @@ public class LayerArrow implements LayerRenderer<EntityLiving>
|
|||
double d1 = 0.0D;
|
||||
double d2 = 0.0D;
|
||||
this.field_177168_a.getRenderManager().renderEntity(entity, d0, d1, d2, partialTicks);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
ItemRenderer.enableStandardItemLighting();
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package game.renderer.layers;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.entity.RenderHumanoid;
|
||||
import game.renderer.model.ModelRenderer;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class LayerCape implements LayerRenderer<EntityNPC>
|
||||
{
|
||||
|
@ -30,8 +31,8 @@ public class LayerCape implements LayerRenderer<EntityNPC>
|
|||
entitylivingbaseIn.getLocationCape() != null) {
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.renderer.bindTexture(entitylivingbaseIn.getLocationCape());
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0F, 0.0F, 0.125F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 0.0F, 0.125F);
|
||||
if(entitylivingbaseIn.isPlayer()) {
|
||||
EntityNPC player = (EntityNPC)entitylivingbaseIn;
|
||||
double d0 = player.prevChasingPosX + (player.chasingPosX - player.prevChasingPosX) * (double)partialTicks - (entitylivingbaseIn.prevX + (entitylivingbaseIn.posX - entitylivingbaseIn.prevX) * (double)partialTicks);
|
||||
|
@ -58,17 +59,17 @@ public class LayerCape implements LayerRenderer<EntityNPC>
|
|||
f1 += 25.0F;
|
||||
}
|
||||
|
||||
WCF.glRotatef(6.0F + f2 / 2.0F + f1, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(f3 / 2.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glRotatef(-f3 / 2.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(6.0F + f2 / 2.0F + f1, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(f3 / 2.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-f3 / 2.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
else {
|
||||
WCF.glRotatef(entitylivingbaseIn.isSneakingVisually() ? 25.0F : 5.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(entitylivingbaseIn.isSneakingVisually() ? 25.0F : 5.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
WCF.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
this.bipedCape.rotationPointY = this.shift + (entitylivingbaseIn.isSneakingVisually() ? 2.0f : 0.0f);
|
||||
this.bipedCape.render(0.0625F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.layers;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.entity.RenderHumanoid;
|
||||
import game.renderer.model.ModelCharge;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class LayerCharge implements LayerRenderer<EntityNPC>
|
||||
|
@ -26,23 +27,23 @@ public class LayerCharge implements LayerRenderer<EntityNPC>
|
|||
// boolean flag = entitylivingbaseIn.isInvisible();
|
||||
GlState.depthMask(true);
|
||||
this.main.bindTexture(LIGHTNING_TEXTURE);
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glLoadIdentity();
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glLoadIdentity();
|
||||
float f = (float)entitylivingbaseIn.ticksExisted + partialTicks;
|
||||
WCF.glTranslatef(f * 0.01F, f * 0.01F, 0.0F);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glTranslatef(f * 0.01F, f * 0.01F, 0.0F);
|
||||
GL11.glMatrixMode(5888);
|
||||
GlState.enableBlend();
|
||||
float f1 = 0.5F;
|
||||
GlState.color(f1, f1, f1, 1.0F);
|
||||
GlState.disableLighting();
|
||||
GlState.blendFunc(1, 1);
|
||||
this.charge.setModelAttributes(this.main.getMainModel());
|
||||
WCF.glScalef(entitylivingbaseIn.height, entitylivingbaseIn.height, entitylivingbaseIn.height);
|
||||
WCF.glTranslatef(0.0f, /* entitylivingbaseIn.isChild() ? 0.5f : */ -0.25f, 0.0f);
|
||||
GL11.glScalef(entitylivingbaseIn.height, entitylivingbaseIn.height, entitylivingbaseIn.height);
|
||||
GL11.glTranslatef(0.0f, -0.25f, 0.0f);
|
||||
this.charge.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glLoadIdentity();
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(5888);
|
||||
GlState.enableLighting();
|
||||
GlState.disableBlend();
|
||||
GlState.depthMask(false);
|
||||
|
|
|
@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL13;
|
|||
import game.entity.animal.EntityDragon;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.entity.RenderDragon;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class LayerEnderDragonEyes implements LayerRenderer<EntityDragon>
|
||||
|
@ -29,7 +28,7 @@ public class LayerEnderDragonEyes implements LayerRenderer<EntityDragon>
|
|||
int i = 61680;
|
||||
int j = i % 65536;
|
||||
int k = i / 65536;
|
||||
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||
GlState.enableLighting();
|
||||
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);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.layers;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.animal.EntityDragon;
|
||||
import game.renderer.DefaultVertexFormats;
|
||||
import game.renderer.GlState;
|
||||
|
@ -7,7 +9,6 @@ import game.renderer.ItemRenderer;
|
|||
import game.renderer.RenderBuffer;
|
||||
import game.renderer.Tessellator;
|
||||
import game.rng.Random;
|
||||
import game.window.WCF;
|
||||
|
||||
public class LayerEntityBreak implements LayerRenderer<EntityDragon>
|
||||
{
|
||||
|
@ -34,17 +35,17 @@ public class LayerEntityBreak implements LayerRenderer<EntityDragon>
|
|||
GlState.disableAlpha();
|
||||
GlState.enableCull();
|
||||
GlState.depthMask(false);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0F, -1.0F, -2.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, -1.0F, -2.0F);
|
||||
|
||||
for (int i = 0; (float)i < (f + f * f) / 2.0F * 60.0F; ++i)
|
||||
{
|
||||
WCF.glRotatef(random.floatv() * 360.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(random.floatv() * 360.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(random.floatv() * 360.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glRotatef(random.floatv() * 360.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(random.floatv() * 360.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(random.floatv() * 360.0F + f * 90.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(random.floatv() * 360.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(random.floatv() * 360.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(random.floatv() * 360.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(random.floatv() * 360.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(random.floatv() * 360.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(random.floatv() * 360.0F + f * 90.0F, 0.0F, 0.0F, 1.0F);
|
||||
float f2 = random.floatv() * 20.0F + 5.0F + f1 * 10.0F;
|
||||
float f3 = random.floatv() * 2.0F + 1.0F + f1 * 2.0F;
|
||||
worldrenderer.begin(6, DefaultVertexFormats.POSITION_COLOR);
|
||||
|
@ -56,7 +57,7 @@ public class LayerEntityBreak implements LayerRenderer<EntityDragon>
|
|||
Tessellator.draw();
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.depthMask(true);
|
||||
GlState.disableCull();
|
||||
GlState.disableBlend();
|
||||
|
|
|
@ -2,6 +2,8 @@ package game.renderer.layers;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import game.Game;
|
||||
|
@ -12,7 +14,6 @@ import game.renderer.blockmodel.ModelGenerator;
|
|||
import game.renderer.model.ModelBox;
|
||||
import game.renderer.model.ModelHumanoid;
|
||||
import game.renderer.model.ModelRenderer;
|
||||
import game.window.WCF;
|
||||
|
||||
public class LayerExtra implements LayerRenderer<EntityNPC>
|
||||
{
|
||||
|
@ -62,11 +63,11 @@ public class LayerExtra implements LayerRenderer<EntityNPC>
|
|||
// {
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Game.getGame().getTextureManager().bindTexture(extended.getLocationSkin());
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (entity.isSneakingVisually())
|
||||
{
|
||||
WCF.glTranslatef(0.0F, /* entity.isChild() ? 0.0F : */ 0.2F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.2F, 0.0F);
|
||||
}
|
||||
|
||||
// if (entity.isChild())
|
||||
|
@ -77,20 +78,20 @@ public class LayerExtra implements LayerRenderer<EntityNPC>
|
|||
// SKC.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
// }
|
||||
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.model.bipedBody.postRender(0.0625F);
|
||||
for(ModelRenderer model : this.wing) {
|
||||
if(extended.hasDualWings()) {
|
||||
WCF.glPushMatrix();
|
||||
WCF.glRotatef(model.rotateAngleY < 0.0f ? -10.0f : 10.0f, 0.0f, 1.0f, 0.0f);
|
||||
WCF.glTranslatef(0.0f, 0.125f, -0.0625f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(model.rotateAngleY < 0.0f ? -10.0f : 10.0f, 0.0f, 1.0f, 0.0f);
|
||||
GL11.glTranslatef(0.0f, 0.125f, -0.0625f);
|
||||
model.render(0.0625F);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glRotatef(model.rotateAngleY < 0.0f ? 10.0f : -10.0f, 0.0f, 1.0f, 0.0f);
|
||||
WCF.glTranslatef(model.rotateAngleY < 0.0f ? 0.0625f : -0.0625f, -0.125f, 0.0f);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(model.rotateAngleY < 0.0f ? 10.0f : -10.0f, 0.0f, 1.0f, 0.0f);
|
||||
GL11.glTranslatef(model.rotateAngleY < 0.0f ? 0.0625f : -0.0625f, -0.125f, 0.0f);
|
||||
model.render(0.0625F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else {
|
||||
model.render(0.0625F);
|
||||
|
@ -99,35 +100,35 @@ public class LayerExtra implements LayerRenderer<EntityNPC>
|
|||
for(ModelRenderer model : this.body) {
|
||||
model.render(0.0625F);
|
||||
}
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.model.bipedLeftArm.postRender(0.0625F);
|
||||
this.model.slimLeftArm.postRender(0.0625F, -1.0f, 0.0f, 0.0f);
|
||||
for(ModelRenderer model : this.larm) {
|
||||
model.render(0.0625F);
|
||||
}
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.model.bipedRightArm.postRender(0.0625F);
|
||||
this.model.slimRightArm.postRender(0.0625F, 1.0f, 0.0f, 0.0f);
|
||||
for(ModelRenderer model : this.rarm) {
|
||||
model.render(0.0625F);
|
||||
}
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
this.model.bipedHead.postRender(0.0625F);
|
||||
for(ModelRenderer model : this.head) {
|
||||
model.render(0.0625F);
|
||||
}
|
||||
for(ModelRenderer model : this.halo) {
|
||||
WCF.glPushMatrix();
|
||||
WCF.glRotatef((float)(entity.ticksExisted % (360 * 4)) * 0.25f, 0.0f, 1.0f, 0.0f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef((float)(entity.ticksExisted % (360 * 4)) * 0.25f, 0.0f, 1.0f, 0.0f);
|
||||
model.render(0.0625F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.layers;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.entity.types.EntityLiving;
|
||||
|
@ -10,7 +12,6 @@ import game.item.ItemStack;
|
|||
import game.renderer.blockmodel.Transforms;
|
||||
import game.renderer.entity.RendererLivingEntity;
|
||||
import game.renderer.model.ModelBiped;
|
||||
import game.window.WCF;
|
||||
|
||||
public class LayerHeldItem implements LayerRenderer<EntityLiving>
|
||||
{
|
||||
|
@ -31,7 +32,7 @@ public class LayerHeldItem implements LayerRenderer<EntityLiving>
|
|||
|
||||
if (itemstack != null)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
// if (this.livingEntityRenderer.getMainModel().isChild)
|
||||
// {
|
||||
|
@ -44,7 +45,7 @@ public class LayerHeldItem implements LayerRenderer<EntityLiving>
|
|||
// }
|
||||
|
||||
((ModelBiped)this.livingEntityRenderer.getMainModel()).postRenderArm(0.0625F);
|
||||
WCF.glTranslatef(this.xshift, this.yshift, 0.0625F);
|
||||
GL11.glTranslatef(this.xshift, this.yshift, 0.0625F);
|
||||
|
||||
if (entitylivingbaseIn.isPlayer() && ((EntityNPC)entitylivingbaseIn).fishEntity != null)
|
||||
{
|
||||
|
@ -56,20 +57,20 @@ public class LayerHeldItem implements LayerRenderer<EntityLiving>
|
|||
|
||||
if (item instanceof ItemBlock && item.getBlock().getRenderType() == 2)
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
||||
WCF.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
||||
GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
float f1 = 0.375F;
|
||||
WCF.glScalef(-f1, -f1, f1);
|
||||
GL11.glScalef(-f1, -f1, f1);
|
||||
}
|
||||
|
||||
if (entitylivingbaseIn.isSneakingVisually())
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 0.203125F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.203125F, 0.0F);
|
||||
}
|
||||
|
||||
gm.getItemRenderer().renderItem(entitylivingbaseIn, itemstack, Transforms.Camera.THIRD_PERSON);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.layers;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.animal.EntityMooshroom;
|
||||
import game.init.Blocks;
|
||||
|
@ -8,7 +10,6 @@ import game.renderer.GlState;
|
|||
import game.renderer.entity.RenderMooshroom;
|
||||
import game.renderer.model.ModelQuadruped;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.window.WCF;
|
||||
|
||||
public class LayerMooshroomMushroom implements LayerRenderer<EntityMooshroom>
|
||||
{
|
||||
|
@ -27,29 +28,29 @@ public class LayerMooshroomMushroom implements LayerRenderer<EntityMooshroom>
|
|||
this.mooshroomRenderer.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GlState.enableCull();
|
||||
GlState.cullFace(1028);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(1.0F, -1.0F, 1.0F);
|
||||
WCF.glTranslatef(0.2F, 0.35F, 0.5F);
|
||||
WCF.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, -1.0F, 1.0F);
|
||||
GL11.glTranslatef(0.2F, 0.35F, 0.5F);
|
||||
GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getState(), 1.0F);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.1F, 0.0F, -0.6F);
|
||||
WCF.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.1F, 0.0F, -0.6F);
|
||||
GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getState(), 1.0F);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
((ModelQuadruped)this.mooshroomRenderer.getMainModel()).head.postRender(0.0625F);
|
||||
WCF.glScalef(1.0F, -1.0F, 1.0F);
|
||||
WCF.glTranslatef(0.0F, 0.7F, -0.2F);
|
||||
WCF.glRotatef(12.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
GL11.glScalef(1.0F, -1.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, 0.7F, -0.2F);
|
||||
GL11.glRotatef(12.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getState(), 1.0F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.cullFace(1029);
|
||||
GlState.disableCull();
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelArachnoid extends ModelHumanoid
|
||||
{
|
||||
|
@ -95,14 +96,14 @@ public class ModelArachnoid extends ModelHumanoid
|
|||
{
|
||||
this.isSneak = false;
|
||||
// this.setVisible(true);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0f, 3.0f / 16.0f, 0.0f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0f, 3.0f / 16.0f, 0.0f);
|
||||
super.render(entityIn, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
// this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
|
||||
// this.spiderHead.render(scale);
|
||||
// this.spiderNeck.render(scale);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
// if (this.isChild)
|
||||
// {
|
||||
// float f = 2.0F;
|
||||
|
@ -122,7 +123,7 @@ public class ModelArachnoid extends ModelHumanoid
|
|||
this.spiderLeg6.render(scale);
|
||||
this.spiderLeg7.render(scale);
|
||||
this.spiderLeg8.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public abstract class ModelBiped extends ModelBase
|
||||
{
|
||||
|
@ -60,7 +61,7 @@ public abstract class ModelBiped extends ModelBase
|
|||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
// if (this.isChild)
|
||||
// {
|
||||
|
@ -88,7 +89,7 @@ public abstract class ModelBiped extends ModelBase
|
|||
// {
|
||||
if (this.isSneak) // entityIn.isSneaking())
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 0.2F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.2F, 0.0F);
|
||||
}
|
||||
|
||||
this.bipedHead.render(scale);
|
||||
|
@ -101,7 +102,7 @@ public abstract class ModelBiped extends ModelBase
|
|||
this.bipedHeadwear.render(scale);
|
||||
// }
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelChicken extends ModelBase
|
||||
{
|
||||
|
@ -54,21 +55,21 @@ public class ModelChicken extends ModelBase
|
|||
if (this.isChild)
|
||||
{
|
||||
float f = 2.0F;
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale);
|
||||
this.head.render(scale);
|
||||
this.bill.render(scale);
|
||||
this.chin.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
WCF.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
GL11.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
this.body.render(scale);
|
||||
this.rightLeg.render(scale);
|
||||
this.leftLeg.render(scale);
|
||||
this.rightWing.render(scale);
|
||||
this.leftWing.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelCrystal extends ModelBase
|
||||
{
|
||||
|
@ -32,28 +33,28 @@ public class ModelCrystal extends ModelBase
|
|||
*/
|
||||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(2.0F, 2.0F, 2.0F);
|
||||
WCF.glTranslatef(0.0F, -0.5F, 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glTranslatef(0.0F, -0.5F, 0.0F);
|
||||
|
||||
if (this.base != null)
|
||||
{
|
||||
this.base.render(scale);
|
||||
}
|
||||
|
||||
WCF.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(0.0F, 0.8F + p_78088_4_, 0.0F);
|
||||
WCF.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
GL11.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.8F + p_78088_4_, 0.0F);
|
||||
GL11.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
this.glass.render(scale);
|
||||
float f = 0.875F;
|
||||
WCF.glScalef(f, f, f);
|
||||
WCF.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
WCF.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
GL11.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
|
||||
this.glass.render(scale);
|
||||
WCF.glScalef(f, f, f);
|
||||
WCF.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
WCF.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
GL11.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
|
||||
this.cube.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelDie extends ModelBase
|
||||
{
|
||||
|
@ -16,11 +17,11 @@ public class ModelDie extends ModelBase
|
|||
|
||||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0F, 0.6F, 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 0.6F, 0.0F);
|
||||
if(Math.abs(entityIn.motionX) > 0.05 || Math.abs(entityIn.motionY) > 0.05 || Math.abs(entityIn.motionZ) > 0.05)
|
||||
WCF.glRotatef((float)((entityIn.ticksExisted % 20) * (360 / 20)), 0.3f, 0.4f, 0.1f);
|
||||
GL11.glRotatef((float)((entityIn.ticksExisted % 20) * (360 / 20)), 0.3f, 0.4f, 0.1f);
|
||||
this.cube.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.animal.EntityDragon;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.renderer.GlState;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelDragon extends ModelBase
|
||||
{
|
||||
|
@ -138,14 +139,14 @@ public class ModelDragon extends ModelBase
|
|||
*/
|
||||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
EntityDragon entitydragon = (EntityDragon)entityIn;
|
||||
float f = entitydragon.prevAnimTime + (entitydragon.animTime - entitydragon.prevAnimTime) * this.partialTicks;
|
||||
this.jaw.rotateAngleX = (float)(Math.sin((double)(f * (float)Math.PI * 2.0F)) + 1.0D) * 0.2F;
|
||||
float f1 = (float)(Math.sin((double)(f * (float)Math.PI * 2.0F - 1.0F)) + 1.0D);
|
||||
f1 = (f1 * f1 * 1.0F + f1 * 2.0F) * 0.05F;
|
||||
WCF.glTranslatef(0.0F, f1 - 2.0F, -3.0F);
|
||||
WCF.glRotatef(f1 * 2.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, f1 - 2.0F, -3.0F);
|
||||
GL11.glRotatef(f1 * 2.0F, 1.0F, 0.0F, 0.0F);
|
||||
float f2 = -30.0F;
|
||||
float f4 = 0.0F;
|
||||
float f5 = 1.5F;
|
||||
|
@ -180,10 +181,10 @@ public class ModelDragon extends ModelBase
|
|||
this.head.rotateAngleY = this.updateRotations(adouble2[0] - adouble[0]) * (float)Math.PI / 180.0F * 1.0F;
|
||||
this.head.rotateAngleZ = -this.updateRotations(adouble2[0] - (double)f7) * (float)Math.PI / 180.0F * 1.0F;
|
||||
this.head.render(scale);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-f6 * f5 * 1.0F, 0.0F, 0.0F, 1.0F);
|
||||
WCF.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-f6 * f5 * 1.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
this.body.rotateAngleZ = 0.0F;
|
||||
this.body.render(scale);
|
||||
|
||||
|
@ -204,7 +205,7 @@ public class ModelDragon extends ModelBase
|
|||
this.wing.render(scale);
|
||||
this.frontLeg.render(scale);
|
||||
this.rearLeg.render(scale);
|
||||
WCF.glScalef(-1.0F, 1.0F, 1.0F);
|
||||
GL11.glScalef(-1.0F, 1.0F, 1.0F);
|
||||
|
||||
if (j == 0)
|
||||
{
|
||||
|
@ -212,7 +213,7 @@ public class ModelDragon extends ModelBase
|
|||
}
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.cullFace(1029);
|
||||
GlState.disableCull();
|
||||
float f10 = -((float)Math.sin((double)(f * (float)Math.PI * 2.0F))) * 0.0F;
|
||||
|
@ -238,7 +239,7 @@ public class ModelDragon extends ModelBase
|
|||
this.spine.render(scale);
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.animal.EntityHorse;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelHorse extends ModelBase
|
||||
{
|
||||
|
@ -241,9 +242,9 @@ public class ModelHorse extends ModelBase
|
|||
|
||||
if (!flag)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(f1, 0.5F + f1 * 0.5F, f1);
|
||||
WCF.glTranslatef(0.0F, 0.95F * (1.0F - f1), 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f1, 0.5F + f1 * 0.5F, f1);
|
||||
GL11.glTranslatef(0.0F, 0.95F * (1.0F - f1), 0.0F);
|
||||
}
|
||||
|
||||
this.backLeftLeg.render(scale);
|
||||
|
@ -261,10 +262,10 @@ public class ModelHorse extends ModelBase
|
|||
|
||||
if (!flag)
|
||||
{
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(f1, f1, f1);
|
||||
WCF.glTranslatef(0.0F, 1.35F * (1.0F - f1), 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f1, f1, f1);
|
||||
GL11.glTranslatef(0.0F, 1.35F * (1.0F - f1), 0.0F);
|
||||
}
|
||||
|
||||
this.body.render(scale);
|
||||
|
@ -276,18 +277,18 @@ public class ModelHorse extends ModelBase
|
|||
|
||||
if (!flag)
|
||||
{
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
float f2 = 0.5F + f1 * f1 * 0.5F;
|
||||
WCF.glScalef(f2, f2, f2);
|
||||
GL11.glScalef(f2, f2, f2);
|
||||
|
||||
if (f <= 0.0F)
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 1.35F * (1.0F - f1), 0.0F);
|
||||
GL11.glTranslatef(0.0F, 1.35F * (1.0F - f1), 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 0.9F * (1.0F - f1) * f + 1.35F * (1.0F - f1) * (1.0F - f), 0.15F * (1.0F - f1) * f);
|
||||
GL11.glTranslatef(0.0F, 0.9F * (1.0F - f1) * f + 1.35F * (1.0F - f1) * (1.0F - f), 0.15F * (1.0F - f1) * f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,7 +307,7 @@ public class ModelHorse extends ModelBase
|
|||
|
||||
if (!flag)
|
||||
{
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if (flag2)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelHumanoid extends ModelBiped
|
||||
{
|
||||
|
@ -149,7 +150,7 @@ public class ModelHumanoid extends ModelBiped
|
|||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
super.render(entityIn, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale);
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
// if (this.isChild)
|
||||
// {
|
||||
|
@ -170,7 +171,7 @@ public class ModelHumanoid extends ModelBiped
|
|||
// {
|
||||
if (this.isSneak) // entityIn.isSneaking())
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 0.2F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.2F, 0.0F);
|
||||
// }
|
||||
}
|
||||
|
||||
|
@ -187,7 +188,7 @@ public class ModelHumanoid extends ModelBiped
|
|||
// if(this.sticks) {
|
||||
// }
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
// public void renderCape(float scale)
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelMouse extends ModelBase
|
||||
{
|
||||
|
@ -62,9 +63,9 @@ public class ModelMouse extends ModelBase
|
|||
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
|
||||
|
||||
float s = this.isChild ? 0.125f : 0.25f;
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(s, s, s);
|
||||
WCF.glTranslatef(0.0f, (this.isChild ? 171.0f : 74.5f) * scale, 0.0f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glTranslatef(0.0f, (this.isChild ? 171.0f : 74.5f) * scale, 0.0f);
|
||||
// if (this.isChild)
|
||||
// {
|
||||
// float f = 2.0F;
|
||||
|
@ -96,7 +97,7 @@ public class ModelMouse extends ModelBase
|
|||
this.frontLeftLeg.render(scale);
|
||||
this.frontRightLeg.render(scale);
|
||||
// }
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.animal.EntityOcelot;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelOcelot extends ModelBase
|
||||
{
|
||||
|
@ -79,14 +80,14 @@ public class ModelOcelot extends ModelBase
|
|||
if (this.isChild)
|
||||
{
|
||||
float f = 2.0F;
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(1.5F / f, 1.5F / f, 1.5F / f);
|
||||
WCF.glTranslatef(0.0F, 10.0F * scale, 4.0F * scale);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.5F / f, 1.5F / f, 1.5F / f);
|
||||
GL11.glTranslatef(0.0F, 10.0F * scale, 4.0F * scale);
|
||||
this.ocelotHead.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
WCF.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
GL11.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
this.ocelotBody.render(scale);
|
||||
this.ocelotBackLeftLeg.render(scale);
|
||||
this.ocelotBackRightLeg.render(scale);
|
||||
|
@ -94,7 +95,7 @@ public class ModelOcelot extends ModelBase
|
|||
this.ocelotFrontRightLeg.render(scale);
|
||||
this.ocelotTail.render(scale);
|
||||
this.ocelotTail2.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelQuadruped extends ModelBase
|
||||
{
|
||||
|
@ -46,19 +47,19 @@ public class ModelQuadruped extends ModelBase
|
|||
if (this.isChild)
|
||||
{
|
||||
float f = 2.0F;
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0F, this.childYOffset * scale, this.childZOffset * scale);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, this.childYOffset * scale, this.childZOffset * scale);
|
||||
this.head.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
WCF.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
GL11.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
this.body.render(scale);
|
||||
this.leg1.render(scale);
|
||||
this.leg2.render(scale);
|
||||
this.leg3.render(scale);
|
||||
this.leg4.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.animal.EntityRabbit;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelRabbit extends ModelBase {
|
||||
private final ModelRenderer rabbitLeftFoot;
|
||||
|
@ -100,16 +101,16 @@ public class ModelRabbit extends ModelBase {
|
|||
|
||||
if(this.isChild) {
|
||||
float f = 2.0F;
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale);
|
||||
this.rabbitHead.render(scale);
|
||||
this.rabbitLeftEar.render(scale);
|
||||
this.rabbitRightEar.render(scale);
|
||||
this.rabbitNose.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
WCF.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
GL11.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
this.rabbitLeftFoot.render(scale);
|
||||
this.rabbitRightFoot.render(scale);
|
||||
this.rabbitLeftThigh.render(scale);
|
||||
|
@ -118,7 +119,7 @@ public class ModelRabbit extends ModelBase {
|
|||
this.rabbitLeftArm.render(scale);
|
||||
this.rabbitRightArm.render(scale);
|
||||
this.rabbitTail.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else {
|
||||
this.rabbitLeftFoot.render(scale);
|
||||
|
|
|
@ -8,7 +8,6 @@ import com.google.common.collect.Lists;
|
|||
|
||||
import game.renderer.RenderBuffer;
|
||||
import game.renderer.Tessellator;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelRenderer
|
||||
{
|
||||
|
@ -175,13 +174,13 @@ public class ModelRenderer
|
|||
this.compileDisplayList(p_78785_1_);
|
||||
}
|
||||
|
||||
WCF.glTranslatef(this.offsetX, this.offsetY, this.offsetZ);
|
||||
GL11.glTranslatef(this.offsetX, this.offsetY, this.offsetZ);
|
||||
|
||||
if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F)
|
||||
{
|
||||
if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F)
|
||||
{
|
||||
WCF.glCallList(this.displayList);
|
||||
GL11.glCallList(this.displayList);
|
||||
|
||||
if (this.childModels != null)
|
||||
{
|
||||
|
@ -193,8 +192,8 @@ public class ModelRenderer
|
|||
}
|
||||
else
|
||||
{
|
||||
WCF.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
|
||||
WCF.glCallList(this.displayList);
|
||||
GL11.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
|
||||
GL11.glCallList(this.displayList);
|
||||
|
||||
if (this.childModels != null)
|
||||
{
|
||||
|
@ -204,30 +203,30 @@ public class ModelRenderer
|
|||
}
|
||||
}
|
||||
|
||||
WCF.glTranslatef(-this.rotationPointX * p_78785_1_, -this.rotationPointY * p_78785_1_, -this.rotationPointZ * p_78785_1_);
|
||||
GL11.glTranslatef(-this.rotationPointX * p_78785_1_, -this.rotationPointY * p_78785_1_, -this.rotationPointZ * p_78785_1_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
|
||||
|
||||
if (this.rotateAngleZ != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleY != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleX != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
WCF.glCallList(this.displayList);
|
||||
GL11.glCallList(this.displayList);
|
||||
|
||||
if (this.childModels != null)
|
||||
{
|
||||
|
@ -237,10 +236,10 @@ public class ModelRenderer
|
|||
}
|
||||
}
|
||||
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
WCF.glTranslatef(-this.offsetX, -this.offsetY, -this.offsetZ);
|
||||
GL11.glTranslatef(-this.offsetX, -this.offsetY, -this.offsetZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -256,26 +255,26 @@ public class ModelRenderer
|
|||
this.compileDisplayList(p_78791_1_);
|
||||
}
|
||||
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(this.rotationPointX * p_78791_1_, this.rotationPointY * p_78791_1_, this.rotationPointZ * p_78791_1_);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(this.rotationPointX * p_78791_1_, this.rotationPointY * p_78791_1_, this.rotationPointZ * p_78791_1_);
|
||||
|
||||
if (this.rotateAngleY != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleX != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleZ != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
WCF.glCallList(this.displayList);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glCallList(this.displayList);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -298,26 +297,26 @@ public class ModelRenderer
|
|||
{
|
||||
if (this.rotationPointX != 0.0F || this.rotationPointY != 0.0F || this.rotationPointZ != 0.0F)
|
||||
{
|
||||
WCF.glTranslatef(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale);
|
||||
GL11.glTranslatef(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glTranslatef(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale);
|
||||
GL11.glTranslatef(this.rotationPointX * scale, this.rotationPointY * scale, this.rotationPointZ * scale);
|
||||
|
||||
if (this.rotateAngleZ != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleY != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleX != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -339,26 +338,26 @@ public class ModelRenderer
|
|||
{
|
||||
if (this.rotationPointX + x != 0.0F || this.rotationPointY + y != 0.0F || this.rotationPointZ + z != 0.0F)
|
||||
{
|
||||
WCF.glTranslatef((this.rotationPointX + x) * scale, (this.rotationPointY + y) * scale, (this.rotationPointZ + z) * scale);
|
||||
GL11.glTranslatef((this.rotationPointX + x) * scale, (this.rotationPointY + y) * scale, (this.rotationPointZ + z) * scale);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glTranslatef((this.rotationPointX + x) * scale, (this.rotationPointY + y) * scale, (this.rotationPointZ + z) * scale);
|
||||
GL11.glTranslatef((this.rotationPointX + x) * scale, (this.rotationPointY + y) * scale, (this.rotationPointZ + z) * scale);
|
||||
|
||||
if (this.rotateAngleZ != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleY != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleX != 0.0F)
|
||||
{
|
||||
WCF.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -367,8 +366,8 @@ public class ModelRenderer
|
|||
|
||||
private void compileDisplayList(float scale)
|
||||
{
|
||||
this.displayList = WCF.glGenLists(1);
|
||||
WCF.glNewList(this.displayList, GL11.GL_COMPILE);
|
||||
this.displayList = GL11.glGenLists(1);
|
||||
GL11.glNewList(this.displayList, GL11.GL_COMPILE);
|
||||
// Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
|
||||
|
@ -377,13 +376,13 @@ public class ModelRenderer
|
|||
((ModelBox)this.cubeList.get(i)).makeList(worldrenderer, scale);
|
||||
}
|
||||
|
||||
WCF.glEndList();
|
||||
GL11.glEndList();
|
||||
this.compiled = true;
|
||||
}
|
||||
|
||||
public void deleteDisplayList() {
|
||||
if(this.displayList != 0)
|
||||
WCF.glDeleteLists(this.displayList, 1);
|
||||
GL11.glDeleteLists(this.displayList, 1);
|
||||
this.displayList = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.entity.Entity;
|
||||
import game.entity.animal.EntityWolf;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
|
||||
public class ModelWolf extends ModelBase
|
||||
{
|
||||
|
@ -76,13 +77,13 @@ public class ModelWolf extends ModelBase
|
|||
if (this.isChild)
|
||||
{
|
||||
float f = 2.0F;
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 5.0F * scale, 2.0F * scale);
|
||||
this.wolfHeadMain.renderWithRotation(scale);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
WCF.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
GL11.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
this.wolfBody.render(scale);
|
||||
this.wolfLeg1.render(scale);
|
||||
this.wolfLeg2.render(scale);
|
||||
|
@ -90,7 +91,7 @@ public class ModelWolf extends ModelBase
|
|||
this.wolfLeg4.render(scale);
|
||||
this.wolfTail.renderWithRotation(scale);
|
||||
this.wolfMane.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -7,7 +7,6 @@ import game.entity.Entity;
|
|||
import game.renderer.GlState;
|
||||
import game.renderer.RenderBuffer;
|
||||
import game.renderer.entity.RenderManager;
|
||||
import game.window.WCF;
|
||||
import game.world.World;
|
||||
|
||||
public class EntityPickupFX extends EntityFX
|
||||
|
@ -47,7 +46,7 @@ public class EntityPickupFX extends EntityFX
|
|||
int i = this.getBrightnessForRender(partialTicks);
|
||||
int j = i % 65536;
|
||||
int k = i / 65536;
|
||||
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
d6 = d6 - interpPosX;
|
||||
d7 = d7 - interpPosY;
|
||||
|
|
|
@ -2,8 +2,9 @@ package game.renderer.texture;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.renderer.GlState;
|
||||
import game.window.WCF;
|
||||
|
||||
public abstract class Texture
|
||||
{
|
||||
|
@ -13,7 +14,7 @@ public abstract class Texture
|
|||
{
|
||||
if (this.glTextureId == -1)
|
||||
{
|
||||
this.glTextureId = WCF.glGenTextures();
|
||||
this.glTextureId = GL11.glGenTextures();
|
||||
}
|
||||
|
||||
return this.glTextureId;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.texture;
|
||||
|
||||
import static org.lwjgl.system.MemoryUtil.NULL;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -10,10 +12,10 @@ import java.nio.IntBuffer;
|
|||
import javax.imageio.ImageIO;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import game.renderer.GlState;
|
||||
import game.util.FileUtils;
|
||||
import game.window.WCF;
|
||||
|
||||
public class TextureUtil
|
||||
{
|
||||
|
@ -24,10 +26,10 @@ public class TextureUtil
|
|||
public static void uploadTexture(int[] data, int w, int h, int x, int y)
|
||||
{
|
||||
int i = 4194304 / w;
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
|
||||
int l;
|
||||
|
||||
for (int j = 0; j < w * h; j += w * l)
|
||||
|
@ -38,7 +40,7 @@ public class TextureUtil
|
|||
BUFFER.clear();
|
||||
BUFFER.put(data, j, i1);
|
||||
BUFFER.position(0).limit(i1);
|
||||
WCF.glTexSubImage2D(x, y + k, w, l, BUFFER);
|
||||
GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, x, y + k, w, l, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, BUFFER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,10 +52,10 @@ public class TextureUtil
|
|||
int h = img.getHeight();
|
||||
int k = 4194304 / w;
|
||||
int[] data = new int[k * w];
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
|
||||
WCF.glTexParameteri(GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
|
||||
|
||||
for (int l = 0; l < w * h; l += w * k)
|
||||
{
|
||||
|
@ -64,7 +66,7 @@ public class TextureUtil
|
|||
BUFFER.clear();
|
||||
BUFFER.put(data, 0, k1);
|
||||
BUFFER.position(0).limit(k1);
|
||||
WCF.glTexSubImage2D(0, i1, w, j1, BUFFER);
|
||||
GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, i1, w, j1, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, BUFFER);
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
@ -79,7 +81,7 @@ public class TextureUtil
|
|||
// SKC.glTexParameterf(SKC.GL_TEXTURE_2D, SKC.GL_TEXTURE_MAX_LOD, 0.0F);
|
||||
// SKC.glTexParameterf(SKC.GL_TEXTURE_2D, SKC.GL_TEXTURE_LOD_BIAS, 0.0F);
|
||||
|
||||
WCF.glTexImage2D(width, height);
|
||||
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 int[] readImageData(String loc) throws IOException
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
|
@ -15,7 +17,6 @@ import game.renderer.model.ModelBanner;
|
|||
import game.renderer.texture.LayeredColorMaskTexture;
|
||||
import game.tileentity.TileEntityBanner;
|
||||
import game.util.ExtMath;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
|
||||
public class TileEntityBannerRenderer extends TileEntitySpecialRenderer<TileEntityBanner>
|
||||
|
@ -31,14 +32,14 @@ public class TileEntityBannerRenderer extends TileEntitySpecialRenderer<TileEnti
|
|||
int i = flag ? te.getBlockMetadata() : 0;
|
||||
// long j = flag ? te.getWorld().getTime() : 0L;
|
||||
double j = flag ? (double)(System.nanoTime() / 1000L) / 50000.0 /* te.getWorld().getTime() */ : (double)partialTicks;
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.6666667F;
|
||||
|
||||
if (flag1)
|
||||
{
|
||||
WCF.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
float f1 = (float)(i * 360) / 16.0F;
|
||||
WCF.glRotatef(-f1, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-f1, 0.0F, 1.0F, 0.0F);
|
||||
this.bannerModel.bannerStand.showModel = true;
|
||||
}
|
||||
else
|
||||
|
@ -60,9 +61,9 @@ public class TileEntityBannerRenderer extends TileEntitySpecialRenderer<TileEnti
|
|||
f2 = -90.0F;
|
||||
}
|
||||
|
||||
WCF.glTranslatef((float)x + 0.5F, (float)y - 0.25F * f, (float)z + 0.5F);
|
||||
WCF.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(0.0F, -0.3125F, -0.4375F);
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y - 0.25F * f, (float)z + 0.5F);
|
||||
GL11.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.3125F, -0.4375F);
|
||||
this.bannerModel.bannerStand.showModel = false;
|
||||
}
|
||||
|
||||
|
@ -75,14 +76,14 @@ public class TileEntityBannerRenderer extends TileEntitySpecialRenderer<TileEnti
|
|||
if (resourcelocation != null)
|
||||
{
|
||||
this.bindTexture(resourcelocation);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(f, -f, -f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, -f, -f);
|
||||
this.bannerModel.renderBanner();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private String func_178463_a(TileEntityBanner bannerObj)
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package game.renderer.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.block.Block;
|
||||
import game.block.BlockChest;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.model.ModelChest;
|
||||
import game.renderer.model.ModelLargeChest;
|
||||
import game.tileentity.TileEntityChest;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class TileEntityChestRenderer extends TileEntitySpecialRenderer<TileEntityChest>
|
||||
|
@ -74,11 +75,11 @@ public class TileEntityChestRenderer extends TileEntitySpecialRenderer<TileEntit
|
|||
if (destroyStage >= 0)
|
||||
{
|
||||
this.bindTexture(DESTROY_STAGES[destroyStage]);
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(4.0F, 4.0F, 1.0F);
|
||||
WCF.glTranslatef(0.0625F, 0.0625F, 0.0625F);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(4.0F, 4.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0625F, 0.0625F, 0.0625F);
|
||||
GL11.glMatrixMode(5888);
|
||||
}
|
||||
// else if (this.isChristmas)
|
||||
// {
|
||||
|
@ -100,11 +101,11 @@ public class TileEntityChestRenderer extends TileEntitySpecialRenderer<TileEntit
|
|||
if (destroyStage >= 0)
|
||||
{
|
||||
this.bindTexture(DESTROY_STAGES[destroyStage]);
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(8.0F, 4.0F, 1.0F);
|
||||
WCF.glTranslatef(0.0625F, 0.0625F, 0.0625F);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(8.0F, 4.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0625F, 0.0625F, 0.0625F);
|
||||
GL11.glMatrixMode(5888);
|
||||
}
|
||||
// else if (this.isChristmas)
|
||||
// {
|
||||
|
@ -120,7 +121,7 @@ public class TileEntityChestRenderer extends TileEntitySpecialRenderer<TileEntit
|
|||
}
|
||||
}
|
||||
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GlState.enableRescaleNormal();
|
||||
|
||||
if (destroyStage < 0)
|
||||
|
@ -128,9 +129,9 @@ public class TileEntityChestRenderer extends TileEntitySpecialRenderer<TileEntit
|
|||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
WCF.glTranslatef((float)x, (float)y + 1.0F, (float)z + 1.0F);
|
||||
WCF.glScalef(1.0F, -1.0F, -1.0F);
|
||||
WCF.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef((float)x, (float)y + 1.0F, (float)z + 1.0F);
|
||||
GL11.glScalef(1.0F, -1.0F, -1.0F);
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
int j = 0;
|
||||
|
||||
if (i == 2)
|
||||
|
@ -155,16 +156,16 @@ public class TileEntityChestRenderer extends TileEntitySpecialRenderer<TileEntit
|
|||
|
||||
if (i == 2 && te.adjacentChestXPos != null)
|
||||
{
|
||||
WCF.glTranslatef(1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (i == 5 && te.adjacentChestZPos != null)
|
||||
{
|
||||
WCF.glTranslatef(0.0F, 0.0F, -1.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, -1.0F);
|
||||
}
|
||||
|
||||
WCF.glRotatef((float)j, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glRotatef((float)j, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
float f = te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * partialTicks;
|
||||
|
||||
if (te.adjacentChestZNeg != null)
|
||||
|
@ -192,14 +193,14 @@ public class TileEntityChestRenderer extends TileEntitySpecialRenderer<TileEntit
|
|||
modelchest.chestLid.rotateAngleX = -(f * (float)Math.PI / 2.0F);
|
||||
modelchest.renderAll();
|
||||
GlState.disableRescaleNormal();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
if (destroyStage >= 0)
|
||||
{
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glMatrixMode(5888);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.block.Block;
|
||||
import game.init.Blocks;
|
||||
import game.init.Items;
|
||||
|
@ -8,7 +10,6 @@ import game.renderer.GlState;
|
|||
import game.tileentity.TileEntityBanner;
|
||||
import game.tileentity.TileEntityChest;
|
||||
import game.tileentity.TileEntitySkull;
|
||||
import game.window.WCF;
|
||||
import game.world.Facing;
|
||||
|
||||
public class TileEntityItemStackRenderer
|
||||
|
@ -43,13 +44,13 @@ public class TileEntityItemStackRenderer
|
|||
|
||||
if (TileEntitySkullRenderer.instance != null)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef(-0.5F, 0.0F, -0.5F);
|
||||
WCF.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.5F);
|
||||
GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GlState.disableCull();
|
||||
TileEntitySkullRenderer.instance.renderSkull(0.0F, 0.0F, 0.0F, Facing.UP, 0.0F, -1);
|
||||
GlState.enableCull();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
package game.renderer.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.Entity;
|
||||
import game.tileentity.TileEntityMobSpawner;
|
||||
import game.window.WCF;
|
||||
|
||||
public class TileEntityMobSpawnerRenderer extends TileEntitySpecialRenderer<TileEntityMobSpawner>
|
||||
{
|
||||
public void renderTileEntityAt(TileEntityMobSpawner te, double x, double y, double z, float partialTicks, int destroyStage)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glTranslatef((float)x + 0.5F, (float)y, (float)z + 0.5F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y, (float)z + 0.5F);
|
||||
renderMob(te, x, y, z, partialTicks);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,11 +26,11 @@ public class TileEntityMobSpawnerRenderer extends TileEntitySpecialRenderer<Tile
|
|||
if (entity != null)
|
||||
{
|
||||
float f = 0.4375F;
|
||||
WCF.glTranslatef(0.0F, 0.4F, 0.0F);
|
||||
WCF.glRotatef((float)(mobSpawnerLogic.getPrevMobRotation() + (mobSpawnerLogic.getMobRotation() - mobSpawnerLogic.getPrevMobRotation()) * (double)partialTicks) * 10.0F, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
WCF.glTranslatef(0.0F, -0.4F, 0.0F);
|
||||
WCF.glScalef(f, f, f);
|
||||
GL11.glTranslatef(0.0F, 0.4F, 0.0F);
|
||||
GL11.glRotatef((float)(mobSpawnerLogic.getPrevMobRotation() + (mobSpawnerLogic.getMobRotation() - mobSpawnerLogic.getPrevMobRotation()) * (double)partialTicks) * 10.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
|
||||
GL11.glScalef(f, f, f);
|
||||
entity.setLocationAndAngles(posX, posY, posZ, 0.0F, 0.0F);
|
||||
Game.getGame().getRenderManager().renderEntity(entity, 0.0D, 0.0D, 0.0D, partialTicks);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import game.tileentity.TileEntityMobSpawner;
|
|||
import game.tileentity.TileEntityPiston;
|
||||
import game.tileentity.TileEntitySign;
|
||||
import game.tileentity.TileEntitySkull;
|
||||
import game.window.WCF;
|
||||
import game.world.BlockPos;
|
||||
import game.world.World;
|
||||
|
||||
|
@ -108,7 +107,7 @@ public class TileEntityRendererDispatcher
|
|||
int i = this.worldObj.getCombinedLight(tileentityIn.getPos(), 0);
|
||||
int j = i % 65536;
|
||||
int k = i / 65536;
|
||||
WCF.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)j / 1.0F, (float)k / 1.0F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
BlockPos blockpos = tileentityIn.getPos();
|
||||
this.renderTileEntityAt(tileentityIn, (double)blockpos.getX() - staticPlayerX, (double)blockpos.getY() - staticPlayerY, (double)blockpos.getZ() - staticPlayerZ, partialTicks, destroyStage);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package game.renderer.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.block.Block;
|
||||
import game.gui.Font;
|
||||
import game.init.Blocks;
|
||||
|
@ -8,7 +10,6 @@ import game.renderer.Drawing.Vec2i;
|
|||
import game.renderer.GlState;
|
||||
import game.renderer.model.ModelSign;
|
||||
import game.tileentity.TileEntitySign;
|
||||
import game.window.WCF;
|
||||
|
||||
|
||||
public class TileEntitySignRenderer extends TileEntitySpecialRenderer<TileEntitySign>
|
||||
|
@ -21,14 +22,14 @@ public class TileEntitySignRenderer extends TileEntitySpecialRenderer<TileEntity
|
|||
public void renderTileEntityAt(TileEntitySign te, double x, double y, double z, float partialTicks, int destroyStage)
|
||||
{
|
||||
Block block = te.getBlockType();
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.6666667F;
|
||||
|
||||
if (block == Blocks.sign)
|
||||
{
|
||||
WCF.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
float f1 = (float)(te.getBlockMetadata() * 360) / 16.0F;
|
||||
WCF.glRotatef(-f1, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-f1, 0.0F, 1.0F, 0.0F);
|
||||
this.model.signStick.showModel = true;
|
||||
}
|
||||
else
|
||||
|
@ -51,20 +52,20 @@ public class TileEntitySignRenderer extends TileEntitySpecialRenderer<TileEntity
|
|||
f2 = -90.0F;
|
||||
}
|
||||
|
||||
WCF.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
WCF.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(0.0F, -0.3125F, -0.4375F);
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
GL11.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.3125F, -0.4375F);
|
||||
this.model.signStick.showModel = false;
|
||||
}
|
||||
|
||||
if (destroyStage >= 0)
|
||||
{
|
||||
this.bindTexture(DESTROY_STAGES[destroyStage]);
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(4.0F, 2.0F, 1.0F);
|
||||
WCF.glTranslatef(0.0625F, 0.0625F, 0.0625F);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(4.0F, 2.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0625F, 0.0625F, 0.0625F);
|
||||
GL11.glMatrixMode(5888);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -72,15 +73,15 @@ public class TileEntitySignRenderer extends TileEntitySpecialRenderer<TileEntity
|
|||
}
|
||||
|
||||
GlState.enableRescaleNormal();
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(f, -f, -f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, -f, -f);
|
||||
this.model.renderSign();
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
// FontRenderer fontrenderer = this.getFontRenderer();
|
||||
float f3 = 0.015625F * f;
|
||||
WCF.glTranslatef(0.0F, 0.5F * f, 0.07F * f);
|
||||
WCF.glScalef(f3, -f3, f3);
|
||||
WCF.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
GL11.glTranslatef(0.0F, 0.5F * f, 0.07F * f);
|
||||
GL11.glScalef(f3, -f3, f3);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
GlState.depthMask(false);
|
||||
int i = 0;
|
||||
|
||||
|
@ -101,10 +102,10 @@ public class TileEntitySignRenderer extends TileEntitySpecialRenderer<TileEntity
|
|||
// }
|
||||
// else
|
||||
// {
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(0.75f, 0.75f, 0.75f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.75f, 0.75f, 0.75f);
|
||||
this.drawdString(s, -this.getdStringWidth(s) / 2, j * (Font.YGLYPH - 3) - 32);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
@ -112,13 +113,13 @@ public class TileEntitySignRenderer extends TileEntitySpecialRenderer<TileEntity
|
|||
|
||||
GlState.depthMask(true);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if (destroyStage >= 0)
|
||||
{
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glMatrixMode(5888);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package game.renderer.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.model.ModelHumanoidHead;
|
||||
import game.tileentity.TileEntitySkull;
|
||||
import game.window.WCF;
|
||||
import game.world.Facing;
|
||||
|
||||
|
||||
|
@ -33,11 +34,11 @@ public class TileEntitySkullRenderer extends TileEntitySpecialRenderer<TileEntit
|
|||
if (destroyStage >= 0)
|
||||
{
|
||||
this.bindTexture(DESTROY_STAGES[destroyStage]);
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(4.0F, 2.0F, 1.0F);
|
||||
WCF.glTranslatef(0.0625F, 0.0625F, 0.0625F);
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(4.0F, 2.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0625F, 0.0625F, 0.0625F);
|
||||
GL11.glMatrixMode(5888);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -74,7 +75,7 @@ public class TileEntitySkullRenderer extends TileEntitySpecialRenderer<TileEntit
|
|||
// }
|
||||
}
|
||||
|
||||
WCF.glPushMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GlState.disableCull();
|
||||
|
||||
if (dir != Facing.UP)
|
||||
|
@ -82,42 +83,42 @@ public class TileEntitySkullRenderer extends TileEntitySpecialRenderer<TileEntit
|
|||
switch (dir)
|
||||
{
|
||||
case NORTH:
|
||||
WCF.glTranslatef(x + 0.5F, y + 0.25F, z + 0.74F);
|
||||
GL11.glTranslatef(x + 0.5F, y + 0.25F, z + 0.74F);
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
WCF.glTranslatef(x + 0.5F, y + 0.25F, z + 0.26F);
|
||||
GL11.glTranslatef(x + 0.5F, y + 0.25F, z + 0.26F);
|
||||
rot = 180.0F;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
WCF.glTranslatef(x + 0.74F, y + 0.25F, z + 0.5F);
|
||||
GL11.glTranslatef(x + 0.74F, y + 0.25F, z + 0.5F);
|
||||
rot = 270.0F;
|
||||
break;
|
||||
|
||||
case EAST:
|
||||
default:
|
||||
WCF.glTranslatef(x + 0.26F, y + 0.25F, z + 0.5F);
|
||||
GL11.glTranslatef(x + 0.26F, y + 0.25F, z + 0.5F);
|
||||
rot = 90.0F;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WCF.glTranslatef(x + 0.5F, y, z + 0.5F);
|
||||
GL11.glTranslatef(x + 0.5F, y, z + 0.5F);
|
||||
}
|
||||
|
||||
float f = 0.0625F;
|
||||
GlState.enableRescaleNormal();
|
||||
WCF.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GL11.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GlState.enableAlpha();
|
||||
this.humanoidHead.render(null, 0.0F, 0.0F, 0.0F, rot, 0.0F, f);
|
||||
WCF.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if (destroyStage >= 0)
|
||||
{
|
||||
WCF.glMatrixMode(5890);
|
||||
WCF.glPopMatrix();
|
||||
WCF.glMatrixMode(5888);
|
||||
GL11.glMatrixMode(5890);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glMatrixMode(5888);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package game.util;
|
||||
|
||||
import game.window.WCF;
|
||||
import game.window.Window;
|
||||
|
||||
public enum PerfSection {
|
||||
TIMING("Timing"),
|
||||
|
@ -29,7 +29,7 @@ public enum PerfSection {
|
|||
}
|
||||
|
||||
public void enter() {
|
||||
this.time = WCF.getTime();
|
||||
this.time = Window.getTime();
|
||||
if(section != null)
|
||||
section.last[swap] = section.time = this.time - section.time;
|
||||
section = this;
|
||||
|
@ -44,7 +44,7 @@ public enum PerfSection {
|
|||
}
|
||||
|
||||
public static void swap() {
|
||||
long current = WCF.getTime();
|
||||
long current = Window.getTime();
|
||||
total = current - start;
|
||||
start = current;
|
||||
swap ^= 1;
|
||||
|
|
|
@ -136,6 +136,6 @@ public enum Keysym implements Input {
|
|||
}
|
||||
|
||||
public boolean read() {
|
||||
return WCF.getKey(this); // .ordinal() + 1
|
||||
return Window.getKey(this); // .ordinal() + 1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,224 +25,11 @@ import org.lwjgl.glfw.GLFWWindowFocusCallback;
|
|||
import org.lwjgl.glfw.GLFWWindowPosCallback;
|
||||
import org.lwjgl.glfw.GLFWWindowRefreshCallback;
|
||||
import org.lwjgl.opengl.GL;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL14;
|
||||
import org.lwjgl.opengl.GL15;
|
||||
import org.lwjgl.system.APIUtil;
|
||||
|
||||
import game.log.Log;
|
||||
|
||||
public abstract class WCF {
|
||||
public static void glAlphaFunc(int func, float ref) {
|
||||
GL11.glAlphaFunc(func, ref);
|
||||
}
|
||||
public static void glBindTexture(int texture) {
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
|
||||
}
|
||||
public static void glBlendFunc(int sfactor, int dfactor) {
|
||||
GL11.glBlendFunc(sfactor, dfactor);
|
||||
}
|
||||
public static void glCallList(int list) {
|
||||
GL11.glCallList(list);
|
||||
}
|
||||
public static void glClear(int mask) {
|
||||
GL11.glClear(mask);
|
||||
}
|
||||
public static void glClearColor(float red, float green, float blue, float alpha) {
|
||||
GL11.glClearColor(red, green, blue, alpha);
|
||||
}
|
||||
public static void glClearDepth(double depth) {
|
||||
GL11.glClearDepth(depth);
|
||||
}
|
||||
public static void glColor4f(float red, float green, float blue, float alpha) {
|
||||
GL11.glColor4f(red, green, blue, alpha);
|
||||
}
|
||||
public static void glColorMask(boolean red, boolean green, boolean blue, boolean alpha) {
|
||||
GL11.glColorMask(red, green, blue, alpha);
|
||||
}
|
||||
public static void glColorMaterial(int face, int mode) {
|
||||
GL11.glColorMaterial(face, mode);
|
||||
}
|
||||
public static void glColorPointer(int size, int type, int stride, long pointer) {
|
||||
GL11.nglColorPointer(size, type, stride, pointer);
|
||||
}
|
||||
public static void glCullFace(int mode) {
|
||||
GL11.glCullFace(mode);
|
||||
}
|
||||
public static void glDeleteLists(int list, int range) {
|
||||
GL11.glDeleteLists(list, range);
|
||||
}
|
||||
public static void glDeleteTextures(int texture) {
|
||||
GL11.glDeleteTextures(texture);
|
||||
}
|
||||
public static void glDepthFunc(int func) {
|
||||
GL11.glDepthFunc(func);
|
||||
}
|
||||
public static void glDepthMask(boolean flag) {
|
||||
GL11.glDepthMask(flag);
|
||||
}
|
||||
public static void glDisable(int cap) {
|
||||
GL11.glDisable(cap);
|
||||
}
|
||||
public static void glDisableClientState(int cap) {
|
||||
GL11.glDisableClientState(cap);
|
||||
}
|
||||
public static void glDrawArrays(int mode, int first, int count) {
|
||||
GL11.glDrawArrays(mode, first, count);
|
||||
}
|
||||
public static void glEnable(int cap) {
|
||||
GL11.glEnable(cap);
|
||||
}
|
||||
public static void glEnableClientState(int cap) {
|
||||
GL11.glEnableClientState(cap);
|
||||
}
|
||||
public static void glEndList() {
|
||||
GL11.glEndList();
|
||||
}
|
||||
public static void glFogf(int pname, float param) {
|
||||
GL11.glFogf(pname, param);
|
||||
}
|
||||
public static void glFogi(int pname, int param) {
|
||||
GL11.glFogi(pname, param);
|
||||
}
|
||||
public static int glGenLists(int range) {
|
||||
return GL11.glGenLists(range);
|
||||
}
|
||||
public static int glGenTextures() {
|
||||
return GL11.glGenTextures();
|
||||
}
|
||||
public static void glLineWidth(float width) {
|
||||
GL11.glLineWidth(width);
|
||||
}
|
||||
public static void glLoadIdentity() {
|
||||
GL11.glLoadIdentity();
|
||||
}
|
||||
public static void glMatrixMode(int mode) {
|
||||
GL11.glMatrixMode(mode);
|
||||
}
|
||||
public static void glNewList(int list, int mode) {
|
||||
GL11.glNewList(list, mode);
|
||||
}
|
||||
public static void glNormal3f(float nx, float ny, float nz) {
|
||||
GL11.glNormal3f(nx, ny, nz);
|
||||
}
|
||||
public static void glPolygonOffset(float factor, float units) {
|
||||
GL11.glPolygonOffset(factor, units);
|
||||
}
|
||||
public static void glPopMatrix() {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
public static void glPushMatrix() {
|
||||
GL11.glPushMatrix();
|
||||
}
|
||||
public static void glRotatef(float angle, float x, float y, float z) {
|
||||
GL11.glRotatef(angle, x, y, z);
|
||||
}
|
||||
public static void glScalef(float x, float y, float z) {
|
||||
GL11.glScalef(x, y, z);
|
||||
}
|
||||
public static void glShadeModel(int mode) {
|
||||
GL11.glShadeModel(mode);
|
||||
}
|
||||
public static void glTexCoordPointer(int size, int type, int stride, long pointer) {
|
||||
GL11.glTexCoordPointer(size, type, stride, pointer);
|
||||
}
|
||||
public static void glTexImage2D(int width, int height) {
|
||||
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) {
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, pname, param);
|
||||
}
|
||||
public static void glTranslatef(float x, float y, float z) {
|
||||
GL11.glTranslatef(x, y, z);
|
||||
}
|
||||
public static void glVertexPointer(int size, int type, int stride, long pointer) {
|
||||
GL11.nglVertexPointer(size, type, stride, pointer);
|
||||
}
|
||||
public static void glOrtho(double left, double right, double bottom, double top, double near, double far) {
|
||||
GL11.glOrtho(left, right, bottom, top, near, far);
|
||||
}
|
||||
public static String glGetString(int id) {
|
||||
return GL11.glGetString(id);
|
||||
}
|
||||
public static void glScissor(int x, int y, int w, int h) {
|
||||
GL11.glScissor(x, y, w, h);
|
||||
}
|
||||
public static void glViewport(int x, int y, int w, int h) {
|
||||
GL11.glViewport(x, y, w, h);
|
||||
}
|
||||
public static void glPolygonMode(boolean line) {
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, line ? GL11.GL_LINE : GL11.GL_FILL);
|
||||
}
|
||||
public static void glFlush() {
|
||||
GL11.glFlush();
|
||||
}
|
||||
public static void glColorPointer(int size, int type, int stride, java.nio.ByteBuffer pointer) {
|
||||
GL11.glColorPointer(size, type, stride, pointer);
|
||||
}
|
||||
public static void glFog(int pname, java.nio.FloatBuffer params) {
|
||||
GL11.glFogfv(pname, params);
|
||||
}
|
||||
public static void glGetFloat(int pname, java.nio.FloatBuffer params) {
|
||||
GL11.glGetFloatv(pname, params);
|
||||
}
|
||||
public static void glGetInteger(java.nio.IntBuffer params) {
|
||||
GL11.glGetIntegerv(GL11.GL_VIEWPORT, params);
|
||||
}
|
||||
public static void glLight(int light, int pname, java.nio.FloatBuffer params) {
|
||||
GL11.glLightfv(light, pname, params);
|
||||
}
|
||||
public static void glLightModel(int pname, java.nio.FloatBuffer params) {
|
||||
GL11.glLightModelfv(pname, params);
|
||||
}
|
||||
public static void glMultMatrix(java.nio.FloatBuffer m) {
|
||||
GL11.glMultMatrixf(m);
|
||||
}
|
||||
public static void glNormalPointer(int type, int stride, java.nio.ByteBuffer pointer) {
|
||||
GL11.glNormalPointer(type, stride, pointer);
|
||||
}
|
||||
public static void glTexCoordPointer(int size, int type, int stride, java.nio.ByteBuffer pointer) {
|
||||
GL11.glTexCoordPointer(size, type, stride, pointer);
|
||||
}
|
||||
public static void glTexSubImage2D(int xoffset, int yoffset, int width, int height, java.nio.IntBuffer 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) {
|
||||
GL11.glVertexPointer(size, type, stride, pointer);
|
||||
}
|
||||
public static void glReadPixels(int x, int y, java.nio.ByteBuffer data) {
|
||||
GL11.glReadPixels(0, 0, x, y, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, data);
|
||||
}
|
||||
|
||||
public static void glActiveTexture(int texture) {
|
||||
GL13.glActiveTexture(texture);
|
||||
}
|
||||
public static void glClientActiveTexture(int texture) {
|
||||
GL13.glClientActiveTexture(texture);
|
||||
}
|
||||
public static void glMultiTexCoord2f(int target, float s, float t) {
|
||||
GL13.glMultiTexCoord2f(target, s, t);
|
||||
}
|
||||
|
||||
public static void glBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha) {
|
||||
GL14.glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
|
||||
}
|
||||
|
||||
public static void glBindBuffer(int buffer) {
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer);
|
||||
}
|
||||
public static void glDeleteBuffers(int buffer) {
|
||||
GL15.glDeleteBuffers(buffer);
|
||||
}
|
||||
public static int glGenBuffers() {
|
||||
return GL15.glGenBuffers();
|
||||
}
|
||||
public static void glBufferData(java.nio.ByteBuffer data) {
|
||||
GL15.glBufferData(GL15.GL_ARRAY_BUFFER, data, GL15.GL_STATIC_DRAW);
|
||||
}
|
||||
|
||||
public abstract class Window {
|
||||
public static long getTime() {
|
||||
return glfwGetTimerValue() / (glfwGetTimerFrequency() / 1000000L);
|
||||
}
|
||||
|
@ -539,11 +326,6 @@ public abstract class WCF {
|
|||
|
||||
public static WindowEvent[] poll() {
|
||||
glfwPollEvents();
|
||||
// int[] data = pollEvents();
|
||||
// WindowEvent[] events = new WindowEvent[data.length / 3];
|
||||
// for(int z = 0; z < events.length; z++) {
|
||||
// events[z] = new WindowEvent(WindowAction.values()[data[z * 3 + 0]], data[z * 3 + 1], data[z * 3 + 2]);
|
||||
// }
|
||||
WindowEvent[] events = EVENTS.toArray(new WindowEvent[EVENTS.size()]);
|
||||
EVENTS.clear();
|
||||
return events;
|
||||
|
@ -551,15 +333,8 @@ public abstract class WCF {
|
|||
public static DisplayMode[] getDisplayModes() {
|
||||
long monitor = glfwGetPrimaryMonitor();
|
||||
GLFWVidMode.Buffer data = monitor == NULL ? null : glfwGetVideoModes(monitor);
|
||||
// int[] data = getModes();
|
||||
if(data == null)
|
||||
return null;
|
||||
// modes.forEach(new Consumer<GLFWVidMode>() {
|
||||
// public void accept(GLFWVidMode t) {
|
||||
// // TODO Auto-generated method stub
|
||||
//
|
||||
// }
|
||||
// });
|
||||
DisplayMode[] modes = new DisplayMode[data.limit()];
|
||||
for(int z = 0; z < data.limit(); z++) {
|
||||
GLFWVidMode mode = data.get(z);
|
||||
|
@ -570,7 +345,6 @@ public abstract class WCF {
|
|||
public static DisplayMode getDisplayMode() {
|
||||
long monitor = glfwGetPrimaryMonitor();
|
||||
GLFWVidMode mode = monitor == NULL ? null : glfwGetVideoMode(monitor);
|
||||
// int[] data = getMode();
|
||||
if(mode == null)
|
||||
return null;
|
||||
return new DisplayMode(mode.width(), mode.height(), mode.refreshRate());
|
||||
|
@ -588,30 +362,6 @@ public abstract class WCF {
|
|||
if(glfwGetTimerFrequency() < 1000000L)
|
||||
throw new IllegalStateException("Timer unterstützt keine Mikrosekunden-Präzision");
|
||||
Log.SYSTEM.info("LWJGL " + Version.getVersion());
|
||||
/*
|
||||
System.setProperty("java.library.path", "lib");
|
||||
try {
|
||||
java.lang.reflect.Field paths = ClassLoader.class.getDeclaredField("sys_paths");
|
||||
paths.setAccessible(true);
|
||||
paths.set(null, null);
|
||||
paths.setAccessible(false);
|
||||
}
|
||||
catch(NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
java.io.File dir = new java.io.File("lib");
|
||||
dir.mkdirs();
|
||||
java.io.InputStream in = WCF.class.getResourceAsStream("/libwcf.so");
|
||||
if(in == null)
|
||||
throw new RuntimeException(new java.io.FileNotFoundException("libwcf.so"));
|
||||
try {
|
||||
java.nio.file.Files.copy(in, new java.io.File(dir, "libwcf.so").toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
catch(java.io.IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
System.loadLibrary("wcf");
|
||||
*/
|
||||
}
|
||||
public static void end() {
|
||||
glfwTerminate();
|
Loading…
Add table
Add a link
Reference in a new issue