public void run() {
        try {
            if (isWindowed) {
                Display.setDisplayMode(findDisplayMode(sizeX, sizeY, Display.getDisplayMode().getBitsPerPixel()));
            } else {
                Display.setDisplayModeAndFullscreen(findDisplayMode(sizeX, sizeY, Display.getDisplayMode().getBitsPerPixel()));
            }
            Display.setTitle(gameName);
            Display.create();
            engineLogger.info("Starting LWJGL - OpenAL...");
            AL.create();
            engineLogger.info("LWJGL - OpenAL successfully started !");
            Mouse.create();
            Keyboard.create();
            initOpenGL();
            init();
            ByteBuffer[] shit = new ByteBuffer[2];
            if (getIconPackage() == null) {
                shit[0] = renderEngine.mountTexture("PNG", GameApplication.class.getResourceAsStream("icon16.png"));
                shit[1] = renderEngine.mountTexture("PNG", GameApplication.class.getResourceAsStream("icon32.png"));
            } else {
                shit[0] = renderEngine.mountTexture("PNG", ClassLoader.getSystemResourceAsStream("./" + getIconPackage() + "/gameIcon16.png"));
                shit[1] = renderEngine.mountTexture("PNG", ClassLoader.getSystemResourceAsStream("./" + getIconPackage() + "/gameIcon32.png"));
            }
            Display.setIcon(shit);
            while (!Display.isCloseRequested()) {
                curTime = getTime();
                Display.update();
                gameTimer.updateTimer();
                GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
                for (int j = 0; j < gameTimer.elapsedTicks; j++) {
                    update();
                }
                render();

                updateFPS();
                prevTime = curTime;
            }
            closeGame();
        } catch (Exception e) {
            onGameCrash(e);
        }
    }