Ejemplo n.º 1
0
  /** Prints some info about the current mode */
  private void currentTest() {
    System.out.println("==== Test Current ====");

    System.out.println("Info about current:");
    System.out.println(
        "Graphics card: " + Display.getAdapter() + ", version: " + Display.getVersion());
    System.out.println(
        "Resolution: "
            + Display.getDisplayMode().getWidth()
            + "x"
            + Display.getDisplayMode().getHeight()
            + "x"
            + Display.getDisplayMode().getBitsPerPixel()
            + "@"
            + Display.getDisplayMode().getFrequency()
            + "Hz");
    System.out.println("---- Test Current ----");
  }
Ejemplo n.º 2
0
  protected void printContextInitInfo() {
    logger.log(
        Level.INFO,
        "Lwjgl {0} context running on thread {1}",
        new Object[] {Sys.getVersion(), Thread.currentThread().getName()});

    logger.log(Level.INFO, "Adapter: {0}", Display.getAdapter());
    logger.log(Level.INFO, "Driver Version: {0}", Display.getVersion());

    String vendor = GL11.glGetString(GL11.GL_VENDOR);
    logger.log(Level.INFO, "Vendor: {0}", vendor);

    String version = GL11.glGetString(GL11.GL_VERSION);
    logger.log(Level.INFO, "OpenGL Version: {0}", version);

    String renderGl = GL11.glGetString(GL11.GL_RENDERER);
    logger.log(Level.INFO, "Renderer: {0}", renderGl);

    if (GLContext.getCapabilities().OpenGL20) {
      String shadingLang = GL11.glGetString(GL20.GL_SHADING_LANGUAGE_VERSION);
      logger.log(Level.INFO, "GLSL Ver: {0}", shadingLang);
    }
  }