Ejemplo n.º 1
0
 @Override
 public void drawScreen(int var1, int var2, float var3) {
   switch (backgroundType) {
     case 0:
       {
         drawDefaultBackground();
         break;
       }
     case 1:
       {
         drawBackground(0);
         break;
       }
     default:
       {
         break;
       }
   }
   LWJGLRenderer var4 = (LWJGLRenderer) GuiWidgetScreen.getInstance().gui.getRenderer();
   ScaledResolution var5 =
       new ScaledResolution(
           GuiWidgetScreen.getInstance().minecraftInstance.gameSettings,
           GuiWidgetScreen.getInstance().minecraftInstance.displayWidth,
           GuiWidgetScreen.getInstance().minecraftInstance.displayHeight);
   RenderScale.scale = var5.getScaleFactor();
   var4.syncViewportSize();
   GuiWidgetScreen.getInstance().gui.update();
 }
Ejemplo n.º 2
0
  @SuppressWarnings("OverridableMethodCallInConstructor")
  public LWJGLRenderer() throws LWJGLException {
    this.ib16 = BufferUtils.createIntBuffer(16);
    this.textureAreas = new ArrayList<TextureArea>();
    this.rotatedTextureAreas = new ArrayList<TextureAreaRotated>();
    this.dynamicImages = new ArrayList<LWJGLDynamicImage>();
    this.tintStateRoot = new TintStack();
    this.tintStack = tintStateRoot;
    this.clipStack = new ClipStack();
    this.clipRectTemp = new Rect();
    syncViewportSize();

    GL11.glGetInteger(GL11.GL_MAX_TEXTURE_SIZE, ib16);
    maxTextureSize = ib16.get(0);

    if (Mouse.isCreated()) {
      int minCursorSize = Cursor.getMinCursorSize();
      IntBuffer tmp = BufferUtils.createIntBuffer(minCursorSize * minCursorSize);
      emptyCursor =
          new Cursor(
              minCursorSize, minCursorSize, minCursorSize / 2, minCursorSize / 2, 1, tmp, null);
    } else {
      emptyCursor = null;
    }

    swCursorAnimState = new SWCursorAnimState();
  }