入口
public static void main(String[] args) {
try {
System.out.println("HelloWorld");
@SuppressWarnings("unused")
GLCapabilities caps = new GLCapabilities(null);
System.out.println("HelloJOGL");
} catch (Exception e) {
e.printStackTrace();
}
}pom.xml
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all</artifactId>
<version>2.1.5-01</version>
</dependency>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all</artifactId>
<version>2.1.5-01</version>
<classifier>natives-windows-amd64</classifier>
</dependency>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>nativewindow</artifactId>
<version>2.1.5-01</version>
<classifier>natives-windows-amd64</classifier>
</dependency>
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt</artifactId>
<version>2.1.5-01</version>
</dependency>
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt</artifactId>
<version>2.1.5-01</version>
<classifier>natives-windows-amd64</classifier>
</dependency>
</dependencies>
本文提供了一个使用Java JOGL库进行简单渲染的示例代码,包括如何设置渲染能力并打印信息到控制台。此外,还展示了如何在Maven项目中配置依赖项来支持JOGL库及本地Windows AMD64位系统的原生支持。
2868

被折叠的 条评论
为什么被折叠?



