Content deleted Content added
Hervegirod (talk | contribs) |
Isaidnoway (talk | contribs) |
||
(14 intermediate revisions by 10 users not shown) | |||
Line 1:
{{
{{
{{Use mdy dates|date=March 2025}}
'''Java Binding for the OpenGL API''' is a [[Java Community Process|JSR]] [[API]] specification (JSR 231) for the [[Java
| url=http://jcp.org/en/jsr/detail?id=231
| title=JSR 231: JavaBinding for the OpenGL API
| publisher=[[Java Community Process]]
| accessdate=February 6, 2011}}</ref> There is also '''Java Binding for the OpenGL ES API''' (JSR 239) for the [[Java Platform, Micro Edition]].
== Programming concepts ==
Core OpenGL API and [[OpenGL Utility Library|GLU]] library calls are available from [[Java (programming language)|Java]] through a thin wrapper looking very much as the original OpenGL [[C (programming language)|C]] API
All platform specific libraries (available from the [[Core OpenGL|CGL]] API for [[Mac OS X]], [[GLX]] for [[X Window System]], and [[WGL (software)|WGL]] for [[Microsoft Windows]]) are also abstracted out to create a platform independent way of selecting [[Framebuffer]] attributes and performing platform specific Framebuffer operations.
==Example==
This
<
int DrawGLScene(GLvoid) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Line 30 ⟶ 37:
return TRUE;
}
</syntaxhighlight>
Which translates to the following [[Java (programming language)|Java]] implementation:
<
public void display(GLAutoDrawable
final GL gl =
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
gl.glLoadIdentity();
Line 53 ⟶ 60:
gl.glFlush();
}
</syntaxhighlight>
== Implementations ==
*[[Java OpenGL]] : The reference implementation, available on [[Microsoft Windows]], [[Linux]], [[Mac OS X]], and [[Solaris (operating system)|Solaris]] platforms.<ref>{{cite web
| url=http://jcp.org/aboutJava/communityprocess/final/jsr231/index.html
| title=JSR-000231 Java Bindings for the OpenGL API
| publisher=[[Java Community Process]]
| quote=''In order to facilitate maximum community participation for the Java Binding for the OpenGL API, we use the JOGL project on java.net found at
| accessdate=February 6, 2011
== See also ==
Line 68 ⟶ 75:
== References ==
{{Reflist
== External links ==
Line 75 ⟶ 82:
* [http://jogamp.org/ JOGL home page]
* [http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/overview-summary.html JSR 231 Specification (draft)]
{{Java desktop}}
{{DEFAULTSORT:Java Bindings For Opengl}}
[[Category:Java specification requests]]
[[Category:Java APIs]]
|