Added a little support for two-pass rendering.
This commit is contained in:
parent
1d19069203
commit
72864e4bc2
2 changed files with 9 additions and 0 deletions
|
@ -77,7 +77,9 @@ public class ForgeHooksClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int renderPass=-1;
|
||||||
public static void beforeRenderPass(int pass) {
|
public static void beforeRenderPass(int pass) {
|
||||||
|
renderPass=pass;
|
||||||
Tessellator.instance=Tessellator.firstInstance;
|
Tessellator.instance=Tessellator.firstInstance;
|
||||||
Tessellator.renderingWorldRenderer=true;
|
Tessellator.renderingWorldRenderer=true;
|
||||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||||
|
@ -89,6 +91,7 @@ public class ForgeHooksClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void afterRenderPass(int pass) {
|
public static void afterRenderPass(int pass) {
|
||||||
|
renderPass=-1;
|
||||||
inWorld=false;
|
inWorld=false;
|
||||||
for(List l : renderTextureList) {
|
for(List l : renderTextureList) {
|
||||||
// TODO: call appropriate client hooks
|
// TODO: call appropriate client hooks
|
||||||
|
|
|
@ -51,4 +51,10 @@ public class MinecraftForgeClient {
|
||||||
rb.renderBlockByRenderType(bl,i,j,k);
|
rb.renderBlockByRenderType(bl,i,j,k);
|
||||||
ForgeHooksClient.afterBlockRender(bl,rb);
|
ForgeHooksClient.afterBlockRender(bl,rb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get the current render pass.
|
||||||
|
*/
|
||||||
|
public static int getRenderPass() {
|
||||||
|
return ForgeHooksClient.renderPass;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue