• Source: Java Bindings for OpenGL
  • Java Binding for the OpenGL API is a JSR API specification (JSR 231) for the Java Platform, Standard Edition which allows to use OpenGL on the Java (software platform). There is also Java Binding for the OpenGL ES API (JSR 239) for the Java Platform, Micro Edition.


    Programming concepts


    Core OpenGL API and GLU library calls are available from Java through a thin wrapper looking very much as the original OpenGL C API, Except GLU NURBS routines which are not exposed through the public API.
    All platform specific libraries (available from the CGL API for Mac OS X, GLX for X Window System, and WGL for Microsoft Windows) are also abstracted out to create a platform independent way of selecting Framebuffer attributes and performing platform specific Framebuffer operations.
    Platform-specific extensions are not included in the public API. Each implementation can choose to export some of these APIs via the GL.getPlatformGLExtensions() Archived 2011-02-17 at the Wayback Machine and GL.getExtension(String) Archived 2011-02-17 at the Wayback Machine method calls which return Objects whose data types are specific to the given implementation.


    Example


    This example shows how to draw a polygon (without initialization or repaint code). Here is the reference C implementation:

    Which translates to the following Java implementation:


    Implementations


    Java OpenGL : The reference implementation, available on Microsoft Windows, Linux, Mac OS X, and Solaris platforms.


    See also


    OpenGL
    Java Community Process


    References




    External links


    JSR web page for Java Binding for the OpenGL API
    JSR web page for Java Binding for the OpenGL ES API
    JOGL home page
    JSR 231 Specification (draft)

Kata Kunci Pencarian: