Created
December 14, 2013 12:42
-
-
Save dha-lo-jd/7958740 to your computer and use it in GitHub Desktop.
SafetyGLの使い方
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void sample() { | |
SafetyGL.safetyGLProcess(new SafetyGL.Processor() { | |
@Override | |
public void process(SafetyGL safetyGL) { | |
Minecraft client = Minecraft.getMinecraft(); | |
client.renderEngine.func_110577_a(Gui.field_110325_k);//普通にテクスチャをバインド① | |
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); | |
safetyGL.pushMatrix(); | |
safetyGL.disable(GL11.GL_DEPTH_TEST); | |
safetyGL.enable(GL11.GL_BLEND); | |
//普通に描画処理をする | |
Tessellator tessellator = Tessellator.instance; | |
tessellator.startDrawingQuads(); | |
tessellator.addVertexWithUV(0,0,0,0,0); | |
tessellator.addVertexWithUV(0,0,0,0,0); | |
tessellator.addVertexWithUV(0,0,0,0,0); | |
tessellator.addVertexWithUV(0,0,0,0,0); | |
tessellator.draw(); | |
//描画処理終わり | |
// safetyGL.popMatrix(); しなくていい | |
// safetyGL.enable(GL11.GL_DEPTH_TEST); しなくていい | |
// safetyGL.disable(GL11.GL_BLEND); しなくていい | |
//処理を抜けると勝手に①がバインドされる前にバインドしていたテクスチャがバインドし直される | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment