use of net.minecraftforge.client.GuiIngameForge in project GregTech by GregTechCE.
the class RenderUtil method applyScissor.
// applies scissor with gui-space coordinates and sizes
private static void applyScissor(int x, int y, int w, int h) {
// translate upper-left to bottom-left
ScaledResolution r = ((GuiIngameForge) Minecraft.getMinecraft().ingameGUI).getResolution();
int s = r.getScaleFactor();
int translatedY = r.getScaledHeight() - y - h;
GL11.glScissor(x * s, translatedY * s, w * s, h * s);
}
Aggregations