1

我有一个使用 OpenGL 代码的应用程序。现在我想把它转换成JOGL代码。是否可以将 OpenGL 代码转换为 JOGL?我们必须做哪些改变?

4

3 回答 3

1

There are the famous suit of Nehe Tutorials for OpenGL, as mentioned above. The best part of this tutorial is that you can view JOGL and Ogl side by side. In Jogl you basically get a thin wrapper around OpenGL with Java syntax, garbage collection and all other libraries available. Making streaming objects and textures over the net and rendering them via OpenGL a breeze, you can also play around with shaders and perform array calculations faster in java using Jogl.

于 2009-09-22T13:49:46.180 回答
0

本教程可能很方便。基本上,您需要将所有 OpenGL 全局函数调用转换为对正确对象实例的调用。这也适用于常量:

glBegin(GL_WHATEVER);

变成

gl.glBegin(GL.GL_WHATEVER);
于 2009-09-22T10:45:07.143 回答
0

大多数 opengl 函数在 jogl 中的名称相同,并且位于 GL 类中。如果您知道 opengl,那么您将很容易将其移植到 jogl。

第一步是:

    GL gl = arg0.getGL();
    GLU glu = arg0.getGLU();

看看网络上的一些教程,这将帮助您入门。

于 2009-09-22T10:47:34.310 回答