Class GLFWNativeOSMesa


  • public class GLFWNativeOSMesa
    extends java.lang.Object
    Native bindings to the GLFW library's GLX native access functions.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  GLFWNativeOSMesa.Functions
      Contains the function pointers loaded from GLFW.getLibrary().
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean glfwGetOSMesaColorBuffer​(long window, int[] width, int[] height, int[] format, org.lwjgl.PointerBuffer buffer)
      Array version of: GetOSMesaColorBuffer
      static boolean glfwGetOSMesaColorBuffer​(long window, java.nio.IntBuffer width, java.nio.IntBuffer height, java.nio.IntBuffer format, org.lwjgl.PointerBuffer buffer)
      Retrieves the color buffer associated with the specified window.
      static long glfwGetOSMesaContext​(long window)
      Returns the OSMesaContext of the specified window.
      static int glfwGetOSMesaDepthBuffer​(long window, int[] width, int[] height, int[] bytesPerValue, org.lwjgl.PointerBuffer buffer)
      Array version of: GetOSMesaDepthBuffer
      static int glfwGetOSMesaDepthBuffer​(long window, java.nio.IntBuffer width, java.nio.IntBuffer height, java.nio.IntBuffer bytesPerValue, org.lwjgl.PointerBuffer buffer)
      Retrieves the depth buffer associated with the specified window.
      static int nglfwGetOSMesaColorBuffer​(long window, long width, long height, long format, long buffer)
      Unsafe version of: GetOSMesaColorBuffer
      static int nglfwGetOSMesaDepthBuffer​(long window, long width, long height, long bytesPerValue, long buffer)
      Unsafe version of: GetOSMesaDepthBuffer
      static void setPath​(java.lang.String path)
      Overrides the OSMesa shared library that GLFW loads internally.
      static void setPath​(org.lwjgl.system.FunctionProvider sharedLibrary)
      Calls setPath(String) with the path of the specified SharedLibrary.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • nglfwGetOSMesaColorBuffer

        public static int nglfwGetOSMesaColorBuffer​(long window,
                                                    long width,
                                                    long height,
                                                    long format,
                                                    long buffer)
        Unsafe version of: GetOSMesaColorBuffer
      • glfwGetOSMesaColorBuffer

        public static boolean glfwGetOSMesaColorBuffer​(long window,
                                                       @Nullable
                                                       java.nio.IntBuffer width,
                                                       @Nullable
                                                       java.nio.IntBuffer height,
                                                       @Nullable
                                                       java.nio.IntBuffer format,
                                                       @Nullable
                                                       org.lwjgl.PointerBuffer buffer)
        Retrieves the color buffer associated with the specified window.

        This function may be called from any thread. Access is not synchronized.

        Parameters:
        window - the window whose color buffer to retrieve
        width - where to store the width of the color buffer, or NULL
        height - where to store the height of the color buffer, or NULL
        format - where to store the OSMesa pixel format of the color buffer, or NULL
        buffer - where to store the address of the color buffer, or NULL
        Returns:
        TRUE if successful, or FALSE if an error occurred.

        Possible errors include NO_WINDOW_CONTEXT and NOT_INITIALIZED.

        Since:
        version 3.3
      • nglfwGetOSMesaDepthBuffer

        public static int nglfwGetOSMesaDepthBuffer​(long window,
                                                    long width,
                                                    long height,
                                                    long bytesPerValue,
                                                    long buffer)
        Unsafe version of: GetOSMesaDepthBuffer
      • glfwGetOSMesaDepthBuffer

        public static int glfwGetOSMesaDepthBuffer​(long window,
                                                   @Nullable
                                                   java.nio.IntBuffer width,
                                                   @Nullable
                                                   java.nio.IntBuffer height,
                                                   @Nullable
                                                   java.nio.IntBuffer bytesPerValue,
                                                   @Nullable
                                                   org.lwjgl.PointerBuffer buffer)
        Retrieves the depth buffer associated with the specified window.

        This function may be called from any thread. Access is not synchronized.

        Parameters:
        window - the window whose depth buffer to retrieve
        width - where to store the width of the depth buffer, or NULL
        height - where to store the height of the depth buffer, or NULL
        bytesPerValue - where to store the number of bytes per depth buffer element, or NULL
        buffer - where to store the address of the depth buffer, or NULL
        Returns:
        TRUE if successful, or FALSE if an error occurred.

        Possible errors include NO_WINDOW_CONTEXT and NOT_INITIALIZED.

        Since:
        version 3.3
      • glfwGetOSMesaContext

        public static long glfwGetOSMesaContext​(long window)
        Returns the OSMesaContext of the specified window.

        This function may be called from any thread. Access is not synchronized.

        Parameters:
        window - the window whose context to retrieve
        Returns:
        the OSMesaContext of the specified window, or NULL if an error occurred.

        Possible errors include NO_WINDOW_CONTEXT and NOT_INITIALIZED.

        Since:
        version 3.3
      • glfwGetOSMesaColorBuffer

        public static boolean glfwGetOSMesaColorBuffer​(long window,
                                                       @Nullable
                                                       int[] width,
                                                       @Nullable
                                                       int[] height,
                                                       @Nullable
                                                       int[] format,
                                                       @Nullable
                                                       org.lwjgl.PointerBuffer buffer)
        Array version of: GetOSMesaColorBuffer
      • glfwGetOSMesaDepthBuffer

        public static int glfwGetOSMesaDepthBuffer​(long window,
                                                   @Nullable
                                                   int[] width,
                                                   @Nullable
                                                   int[] height,
                                                   @Nullable
                                                   int[] bytesPerValue,
                                                   @Nullable
                                                   org.lwjgl.PointerBuffer buffer)
        Array version of: GetOSMesaDepthBuffer
      • setPath

        public static void setPath​(org.lwjgl.system.FunctionProvider sharedLibrary)
        Calls setPath(String) with the path of the specified SharedLibrary.

        Example usage: GLFWNativeOSMesa.setPath(GL.getFunctionProvider());

        Parameters:
        sharedLibrary - a FunctionProvider instance that will be cast to SharedLibrary
      • setPath

        public static void setPath​(@Nullable
                                   java.lang.String path)
        Overrides the OSMesa shared library that GLFW loads internally.

        This is useful when there's a mismatch between the shared libraries loaded by LWJGL and GLFW.

        This method must be called before GLFW initializes OpenGL. The override is available only in the default GLFW build bundled with LWJGL. Using the override with a custom GLFW build will produce a warning in DEBUG mode (but not an error).

        Parameters:
        path - the OSMesa shared library path, or null to remove the override.