public void startClipping ( ClipArea area ) { if ( area . noClip ( ) ) return ; GL11 . glPushAttrib ( GL11 . GL_SCISSOR_BIT ) ; GL11 . glEnable ( GL11 . GL_SCISSOR_TEST ) ; int f = ignoreScale ? 1 : scaleFactor ; int x = area . x * f ; int y = Minecraft . getMinecraft ( ) . displayHeight - ( area . y + area . height ( ) ) * f ; int w = area . width ( ) * f ; int h = area . height ( ) * f ; ; GL11 . glScissor ( x , y , w , h ) ; }
Starts clipping an area to prevent drawing outside of it .