type t
The type of a window
This module provides a high-level wrapper around the low-level window interface of OgamlCore and also provides drawing functions.
Windows encapsulate a copy of the GL context that can be retrieved to obtain information about the GL context.
type t
val create : ?width:int -> ?height:int -> ?title:string -> ?settings:OgamlCore.ContextSettings.t -> unit -> t
width
x height
. This window will create its openGL context following the specified settings.width
defaults to 800height
defaults to 600title
defaults to ""settings
defaults to the default context settingsval settings : t -> OgamlCore.ContextSettings.t
val context : t -> Context.t
val set_title : t -> string -> unit
val set_framerate_limit : t -> int option -> unit
val close : t -> unit
val destroy : t -> unit
val resize : t -> OgamlMath.Vector2i.t -> unit
val toggle_fullscreen : t -> unit
val rect : t -> OgamlMath.IntRect.t
val size : t -> OgamlMath.Vector2i.t
val is_open : t -> bool
val has_focus : t -> bool
val poll_event : t -> OgamlCore.Event.t option
val display : t -> unit
val clear : ?color:Color.t option -> ?depth:bool -> ?stencil:bool -> t -> unit
val show_cursor : t -> bool -> unit
val bind : t -> DrawParameter.t -> unit