inline OpenGL functions to lwjgl GLxx

This commit is contained in:
Sen 2025-03-18 10:24:05 +01:00
parent 783adb350b
commit a2ffb2991d
90 changed files with 1008 additions and 1204 deletions

View file

@ -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);
}