Class GLFWNativeEGL

java.lang.Object
org.lwjgl.glfw.GLFWNativeEGL

public class GLFWNativeEGL extends Object
Native bindings to the GLFW library's EGL native access functions.
  • Method Details

    • glfwGetEGLDisplay

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

      Because EGL is initialized on demand, this function will return EGL10.EGL_NO_DISPLAY until the first context has been created via EGL.

      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(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 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(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 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.