EAGL.Window (eagl v0.3.0)

View Source

Utility module for OpenGL window management. Handles window creation, OpenGL context setup, and event loop management.

Summary

Functions

Creates and runs an OpenGL window using the given callback module. The callback module must implement the GLWindowBehaviour.

Functions

run(callback_module, title)

@spec run(module(), String.t()) :: :ok | {:error, term()}

Creates and runs an OpenGL window using the given callback module. The callback module must implement the GLWindowBehaviour.

Options:

  • size: {width, height} tuple, defaults to {1024, 768}. Sets the initial window size.
  • depth_testing: boolean, defaults to false. When true, enables depth testing and requests a depth buffer.
  • return_to_exit: boolean, defaults to false. When true, pressing ENTER will automatically close the window.

run(callback_module, title, opts)

@spec run(module(), String.t(), keyword()) :: :ok | {:error, term()}