Can't get LWJGL to run using IDEA and SBT

前端 未结 2 514
南笙
南笙 2021-01-12 17:57

I\'ve been scratching myself in the head for a little over an hour with this, nothing on Google seems to be able to give me a decisive answer.

I\'m using Intel

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-12 18:27

    You can include LWJGL (with natives) by simply adding the following snippet to your build.sbt:

    libraryDependencies ++= {
      val version = "3.1.6"
      val os = "windows" // TODO: Change to "linux" or "macos" if necessary
    
      Seq(
        "lwjgl",
        "lwjgl-glfw",
        "lwjgl-opengl"
        // TODO: Add more modules here
      ).flatMap {
        module => {
          Seq(
            "org.lwjgl" % module % version,
            "org.lwjgl" % module % version classifier s"natives-$os"
          )
        }
      }
    }
    

    The classifier function sadly is very undocumented so it took me some time to find this out.

提交回复
热议问题