Class GLUtil

java.lang.Object
overrungl.opengl.GLUtil

public final class GLUtil extends Object
GLUtil relies on preview features of the Java platform:
  • GLUtil refers to one or more preview APIs: Arena.
Programs can only use GLUtil when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
OpenGL utilities.
Since:
0.1.0
Author:
squid233
  • Method Details

    • setupDebugMessageCallback

      @Nullable public static @Nullable ArenaPREVIEW setupDebugMessageCallback()
      Detects the best debug output functionality to use and creates a callback that prints information to API Logger.

      The callback function is returned as an ArenaPREVIEW, that should reset to NULL and be freedPREVIEW when no longer needed, which is often after destroying GL context.

      Returns:
      the arena.
    • setupDebugMessageCallback

      @Nullable public static @Nullable ArenaPREVIEW setupDebugMessageCallback(Consumer<String> logger)
      Detects the best debug output functionality to use and creates a callback that prints information to the specified logger.

      The callback function is returned as a ArenaPREVIEW, that should reset to NULL and be freedPREVIEW when no longer needed, which is often after destroy GL context.

      Parameters:
      logger - the output logger.
      Returns:
      the arena.