The type of a window
Module OgamlGraphics.Window
High-level window wrapper for rendering and event management 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.
Window creation
Creates a window of size
See : OgamlCore.ContextSettings
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 settingsSee : OgamlCore.ContextSettings
Returns the settings used at the creation of the window
Returns the internal GL context of the window
See : OgamlGraphics.Context
See : OgamlGraphics.Context
Changes the title of the window.
Sets a framerate limit
Closes a window, but does not free the memory. This should prevent segfaults when calling functions on this window.
Frees the window and the memory
Resizes the window.
See : OgamlMath.Vector2i
See : OgamlMath.Vector2i
Toggles the full screen mode of a window.
Returns the rectangle associated to a window, in screen coordinates
See : OgamlMath.IntRect
See : OgamlMath.IntRect
Information About Windows
Returns in pixel the width and height of the window (it only takes into account the size of the content where you can draw, *ie* the useful information).
See : OgamlMath.Vector2i
See : OgamlMath.Vector2i
Tells whether the window is currently open
Return true iff the window has the focus
Event Handling
Returns the next event on the event stack, or None if the stack is empty.
See : OgamlCore.Event
See : OgamlCore.Event
Displaying and Drawing
Displays the window after the GL calls
Clears the window. Clears the color buffer with opaque black by default. Clears the depth buffer and the stencil buffer by default.
Show or hide the cursor
Binds the window for drawing. This function is for internal use only.