private static Window createWindow( int width, int height, String title, Monitor monitor, Window share) { setHints(); if (fullScreen) { if (monitor == null) monitor = Monitor.getPrimaryMonitor(); if (videoMode == null) videoMode = monitor.getVideoMode(); width = videoMode.getWidth(); height = videoMode.getHeight(); } Window window = new Window(width, height, title, monitor, share); window.makeCurrent(); setCallbacks(window); clearHints(); if (cursorHidden) window.setInputMode(GLFW_CURSOR, GLFW_CURSOR_HIDDEN); if (cursorGrabbed) window.setInputMode(GLFW_CURSOR, GLFW_CURSOR_DISABLED); if (!fullScreen) window.setPosition(posX, posY); if (cursor == null) defaultCursor = cursor = new Cursor(Cursor.Type.ARROW); window.setCursor(cursor); dirty = true; VertexArray.CURRENT = null; setVSync(vSync); return window; }
public static void setCursor(Cursor cursor) { if (cursor == null) cursor = defaultCursor; Display.cursor = cursor; showCursor(); if (displayWindow == null) return; displayWindow.setCursor(cursor); }