Class WGLARBCreateContext



  • public class WGLARBCreateContext
    extends java.lang.Object
    Native bindings to the WGL_ARB_create_context extension.

    With the advent of new versions of OpenGL which deprecate features and/or break backward compatibility with older versions, there is a need and desire to indicate at context creation which interface will be used. This extension add a new context creation routine with attributes specifying the GL version and context properties requested for the context.

    Requires WGL_ARB_extensions_string.

    • Method Detail

      • wglCreateContextAttribsARB

        public static long wglCreateContextAttribsARB(long hdc,
                                                      long shareContext,
                                                      java.nio.IntBuffer attribList)
        Creates an OpenGL context.

        If shareContext is not NULL, then all shareable data (excluding OpenGL texture objects named 0) will be shared by shareContext, all other contexts shareContext already shares with, and the newly created context. An arbitrary number of contexts can share data in this fashion.

        Parameters:
        hdc -
        shareContext -
        attribList - a list of attributes for the context. The list consists of a sequence of <name, value> pairs terminated by the value 0. If an attribute is not specified in attribList, then the default value is used instead. If an attribute is specified more than once, then the last value specified is used.
      • wglCreateContextAttribsARB

        public static long wglCreateContextAttribsARB(long hdc,
                                                      long shareContext,
                                                      int[] attribList)
        Array version of: CreateContextAttribsARB