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