- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
public static void create(String title, int width, int height) {
if (isWindowCreated())
throw new RuntimeException("Window created.");
if (title == null)
throw new NullPointerException("Window title == null.");
if (width <= 0 || height <= 0)
throw new IllegalArgumentException("Window size <= 0.");
if ((window = GLFW.glfwCreateWindow(width, height, title, MemoryUtil.NULL, MemoryUtil.NULL)) == MemoryUtil.NULL)
throw new RuntimeException("Failed to create the GLFW window.");
}
обертка кроссплатформенной glfw. Правда исключений она, насколько я знаю, действительно не кидает.
А как бы она смогла - она же на C написана.