Module OgamlCore.LL.Window

Window management

This module provides a low-level interface to create and manage windows. You should probably use the OgamlGraphics.Window wrapper.

type t
Type of a window
val create : width:int -> height:int -> title:string -> settings:ContextSettings.t -> t
Creates a window of a given size
val set_title : t -> string -> unit
Sets the tite of the window.
val close : t -> unit
Closes a window, but does not free the memory. This prevents segfaults when calling functions on this window.
val destroy : t -> unit
Destroys and frees the window from the memory
val rect : t -> OgamlMath.IntRect.t
Returns the rectangle associated to a window, in screen coordinates
See : OgamlMath.IntRect
val size : t -> OgamlMath.Vector2i.t
Returns the size of a window
See : OgamlMath.Vector2i
val resize : t -> OgamlMath.Vector2i.t -> unit
Resize a window
See : OgamlMath.Vector2i
val toggle_fullscreen : t -> unit
Toggle the full screen mode of a window
val is_open : t -> bool
Returns true iff the window is open
val has_focus : t -> bool
Returns true iff the window has the focus
val poll_event : t -> Event.t option
Returns the next event on the stack for this window
See : OgamlCore.Event
val display : t -> unit
Displays the window after all the GL calls
val show_cursor : t -> bool -> unit
Show/hide the cursor