Class GLFWNativeEGL


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

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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long glfwGetEGLConfig​(long window)
      Returns the EGLConfig of the specified window.
      static long glfwGetEGLContext​(long window)
      Returns the EGLContext of the specified window.
      static long glfwGetEGLDisplay()
      Returns the EGLDisplay used by GLFW.
      static long glfwGetEGLSurface​(long window)
      Returns the EGLSurface of the specified window.
      static void setEGLPath​(java.lang.String path)
      Overrides the EGL shared library that GLFW loads internally.
      static void setEGLPath​(org.lwjgl.system.FunctionProvider sharedLibrary)
      Calls setEGLPath(String) with the path of the specified SharedLibrary.
      static void setGLESPath​(java.lang.String path)
      Overrides the OpenGL ES shared library that GLFW loads internally.
      static void setGLESPath​(org.lwjgl.system.FunctionProvider sharedLibrary)
      Calls setGLESPath(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

      • glfwGetEGLDisplay

        public static long glfwGetEGLDisplay()
        Returns the EGLDisplay used by GLFW.

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

        Returns:
        the EGLDisplay used by GLFW, or EGL10.EGL_NO_DISPLAY if an error occured.

        Possible errors include NOT_INITIALIZED.

        Since:
        version 3.0
      • glfwGetEGLContext

        public static long glfwGetEGLContext​(long window)
        Returns the EGLContext of the specified window.

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

        Parameters:
        window - a GLFW window
        Returns:
        the EGLContext of the specified window, or EGL10.EGL_NO_CONTEXT if an error occurred.

        Possible errors include NO_WINDOW_CONTEXT and NOT_INITIALIZED.

        Since:
        version 3.0
      • glfwGetEGLSurface

        public static long glfwGetEGLSurface​(long window)
        Returns the EGLSurface of the specified window.

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

        Returns:
        the EGLSurface of the specified window, or EGL10.EGL_NO_SURFACE if an error occurred.

        Possible errors include NO_WINDOW_CONTEXT and NOT_INITIALIZED.

        Since:
        version 3.0
      • glfwGetEGLConfig

        public static long glfwGetEGLConfig​(long window)
        Returns the EGLConfig of the specified window.

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

        Returns:
        the EGLConfig of the specified window, or EGL10.EGL_NO_SURFACE if an error occurred.

        Possible errors include NO_WINDOW_CONTEXT and NOT_INITIALIZED.

        Since:
        version 3.4
      • setEGLPath

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

        Example usage: GLFWNativeEGL.setEGLPath(EGL.getFunctionProvider());

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

        public static void setEGLPath​(@Nullable
                                      java.lang.String path)
        Overrides the EGL 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 EGL. 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 EGL shared library path, or null to remove the override.
      • setGLESPath

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

        Example usage: GLFWNativeEGL.setGLESPath(GLES.getFunctionProvider());

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

        public static void setGLESPath​(@Nullable
                                       java.lang.String path)
        Overrides the OpenGL ES 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 ES. 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 OpenGL ES shared library path, or null to remove the override.