inline OpenGL functions to lwjgl GLxx
This commit is contained in:
parent
783adb350b
commit
a2ffb2991d
90 changed files with 1008 additions and 1204 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue