inline OpenGL constants to lwjgl GLxx
This commit is contained in:
parent
a891ab4d3a
commit
783adb350b
20 changed files with 183 additions and 495 deletions
|
@ -5,6 +5,8 @@ import java.nio.ByteOrder;
|
|||
import java.nio.FloatBuffer;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import game.color.TextColor;
|
||||
|
@ -184,9 +186,9 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
Log.JNI.error((Throwable)exception, (String)"Konnte Objekt nicht rendern");
|
||||
}
|
||||
|
||||
GlState.setActiveTexture(WCF.GL_TEXTURE1);
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE1);
|
||||
GlState.enableTexture2D();
|
||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||
GlState.enableCull();
|
||||
WCF.glPopMatrix();
|
||||
|
||||
|
@ -222,23 +224,23 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
|
|||
float g = (float)(c >> 8 & 255) / 255.0F;
|
||||
float b = (float)(c & 255) / 255.0F;
|
||||
GlState.disableLighting();
|
||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||
GlState.color(r, g, b, 1.0F);
|
||||
GlState.disableTexture2D();
|
||||
GlState.setActiveTexture(WCF.GL_TEXTURE1);
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE1);
|
||||
GlState.disableTexture2D();
|
||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void unsetOutlineColor()
|
||||
{
|
||||
GlState.enableLighting();
|
||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||
GlState.enableTexture2D();
|
||||
GlState.setActiveTexture(WCF.GL_TEXTURE1);
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE1);
|
||||
GlState.enableTexture2D();
|
||||
GlState.setActiveTexture(WCF.GL_TEXTURE0);
|
||||
GlState.setActiveTexture(GL13.GL_TEXTURE0);
|
||||
}
|
||||
|
||||
protected void renderModel(T entity, float x, float y, float z, float yaw, float pitch, float scale)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue