Safe Haskell | None |
---|---|
Language | Haskell98 |
Haskell Interface to GLFW (http://www.glfw.org). Supports GLFW API version 2.7.5.
GLFW thread functions are not supported by this module; use Haskell thread instead.
- type Version = (Int, Int, Int)
- data DisplayBits
- data WindowMode
- = Window
- | FullScreen
- data VideoMode = VideoMode {
- videoWidth :: !Int
- videoHeight :: !Int
- videoRedBits :: !Int
- videoBlueBits :: !Int
- videoGreenBits :: !Int
- data KeyButtonState
- data Key
- data SpecialKey
- = UNKNOWN
- | ESC
- | F1
- | F2
- | F3
- | F4
- | F5
- | F6
- | F7
- | F8
- | F9
- | F10
- | F11
- | F12
- | F13
- | F14
- | F15
- | F16
- | F17
- | F18
- | F19
- | F20
- | F21
- | F22
- | F23
- | F24
- | F25
- | UP
- | DOWN
- | LEFT
- | RIGHT
- | LSHIFT
- | RSHIFT
- | LCTRL
- | RCTRL
- | LALT
- | RALT
- | TAB
- | ENTER
- | BACKSPACE
- | INSERT
- | DEL
- | PAGEUP
- | PAGEDOWN
- | HOME
- | END
- | KP_0
- | KP_1
- | KP_2
- | KP_3
- | KP_4
- | KP_5
- | KP_6
- | KP_7
- | KP_8
- | KP_9
- | KP_DIVIDE
- | KP_MULTIPLY
- | KP_SUBTRACT
- | KP_ADD
- | KP_DECIMAL
- | KP_EQUAL
- | KP_ENTER
- data MouseButton
- newtype Joystick = Joystick Int
- data JoystickParam
- data SpecialFeature
- data TextureFlag
- data BitmapFont = Fixed8x16
- type WindowCloseCallback = IO Bool
- type WindowSizeCallback = Size -> IO ()
- type WindowRefreshCallback = IO ()
- type KeyCallback = Key -> KeyButtonState -> IO ()
- type CharCallback = Char -> KeyButtonState -> IO ()
- type MouseButtonCallback = MouseButton -> KeyButtonState -> IO ()
- type MousePosCallback = Position -> IO ()
- type MouseWheelCallback = Int -> IO ()
- initialize :: IO Bool
- terminate :: IO ()
- version :: GettableStateVar Version
- openWindow :: Size -> [DisplayBits] -> WindowMode -> IO Bool
- closeWindow :: IO ()
- windowTitle :: SettableStateVar String
- windowSize :: StateVar Size
- windowPos :: SettableStateVar Position
- iconifyWindow :: IO ()
- restoreWindow :: IO ()
- swapBuffers :: IO ()
- swapInterval :: SettableStateVar Int
- videoModes :: GettableStateVar [VideoMode]
- desktopMode :: GettableStateVar VideoMode
- pollEvents :: IO ()
- waitEvents :: IO ()
- getKey :: Enum a => a -> IO KeyButtonState
- getMouseButton :: MouseButton -> IO KeyButtonState
- mousePos :: StateVar Position
- mouseWheel :: StateVar Int
- joystickParam :: Joystick -> JoystickParam -> GettableStateVar CInt
- joystickPos :: Joystick -> Int -> GettableStateVar [Float]
- joystickPos' :: Joystick -> GettableStateVar [Float]
- joystickButtons :: Joystick -> GettableStateVar [KeyButtonState]
- windowSizeCallback :: SettableStateVar WindowSizeCallback
- windowCloseCallback :: SettableStateVar WindowCloseCallback
- windowRefreshCallback :: SettableStateVar WindowRefreshCallback
- keyCallback :: SettableStateVar KeyCallback
- charCallback :: SettableStateVar CharCallback
- mouseButtonCallback :: SettableStateVar MouseButtonCallback
- mousePosCallback :: SettableStateVar MousePosCallback
- mouseWheelCallback :: SettableStateVar MouseWheelCallback
- time :: StateVar Double
- sleep :: Double -> IO ()
- extensionSupported :: String -> IO Bool
- glVersion :: GettableStateVar Version
- loadTexture2D :: String -> [TextureFlag] -> IO Bool
- loadMemoryTexture2D :: String -> [TextureFlag] -> IO Bool
- renderString :: BitmapFont -> String -> IO ()
- enableSpecial :: SpecialFeature -> IO ()
- disableSpecial :: SpecialFeature -> IO ()
- type family ParamVal a
- class Param a where
- class Param a => Hint a where
- openWindowHint :: a -> ParamVal a -> IO ()
- data Opened = Opened
- data Active = Active
- data Iconified = Iconified
- data Accelerated = Accelerated
- data RedBits = RedBits
- data GreenBits = GreenBits
- data BlueBits = BlueBits
- data AlphaBits = AlphaBits
- data DepthBits = DepthBits
- data StencilBits = StencilBits
- data RefreshRate = RefreshRate
- data AccumRedBits = AccumRedBits
- data AccumGreenBits = AccumGreenBits
- data AccumBlueBits = AccumBlueBits
- data AccumAlphaBits = AccumAlphaBits
- data AuxBuffers = AuxBuffers
- data Stereo = Stereo
- data NoResize = NoResize
- data FSAASamples = FSAASamples
- data OpenGLVersionMajor = OpenGLVersionMajor
- data OpenGLVersionMinor = OpenGLVersionMinor
- data OpenGLForwardCompat = OpenGLForwardCompat
- data OpenGLDebugContext = OpenGLDebugContext
- data OpenGLProfile = OpenGLProfile
- data Profile
Data types
type Version = (Int, Int, Int) Source
Version is represented by (major, minor, revision), used
in gettable variable version
.
data DisplayBits Source
Bit depth of GL display buffers, used in openWindow
.
data WindowMode Source
Window or Fullscreen mode, used in openWindow
.
Video modes used in gettable variables videoModes
and desktopMode
.
VideoMode | |
|
data KeyButtonState Source
Key or button state.
Key is represented by either a character key or a special key.
data SpecialKey Source
Special key is a key not represented in the 32 - 127 printable ASCII range.
data MouseButton Source
Mouse button is represented by left, right, middle or a number from 0 to 7. Differs from the C API.
Joystick is represent a number from 0 to 15. Differs from the C API.
data JoystickParam Source
Joystick parameters
data SpecialFeature Source
Special features used in enableSpecial
and disableSpecial
.
MouseCursor | When enabled, the mouse cursor is visible and mouse coordinates are relative to the upper left corner of the client area of the GLFW window. The coordinates are limited to the client area of the window. |
StickyKey | When enabled, keys which are pressed will not be released until they are physically
released and checked with |
StickyMouseButton | When enabled, mouse buttons which are pressed will not be released until they are
physically released and checked with |
SystemKey | When enabled, pressing standard system key combinations, such as ALT+TAB under Windows, will give the normal behavior. |
KeyRepeat | When enabled, the key and character callback functions are called repeatedly when a key is held down long enough (according to the system key repeat configuration). |
AutoPollEvent | When enabled, |
data TextureFlag Source
Texture flag used in loadTexture2D
and loadMemoryTexture2D
.
NoRescale | Do not rescale to the closest 2^m x 2^n resolution. |
OriginUL | Specifies that the origin of the loaded image should be in the upper left corner (default is the lower left corner). |
BuildMipMaps | Automatically build and upload all mipmap levels. |
AlphaMap | Treat single component images as alpha maps rather than luminance maps. |
type WindowCloseCallback = IO Bool Source
Callback type for windowCloseCallback
. The callback should return True
to close the window, and False
otherwise.
type WindowSizeCallback = Size -> IO () Source
Callback type for windowSizeCallback
.
type WindowRefreshCallback = IO () Source
Callback type for windowRefreshCallback
.
type KeyCallback = Key -> KeyButtonState -> IO () Source
Callback type for keyCallback
.
type CharCallback = Char -> KeyButtonState -> IO () Source
Callback type for charCallback
.
type MouseButtonCallback = MouseButton -> KeyButtonState -> IO () Source
Callback type for mouseButtonCallback
.
type MousePosCallback = Position -> IO () Source
Callback type for mousePosCallback
.
type MouseWheelCallback = Int -> IO () Source
Callback type for mouseWheelCallback
.
Initialization and Termination
initialize :: IO Bool Source
Terminate GLFW library after use. Before a program terminates, GLFW has to be terminated in order to free up resources, etc.
version :: GettableStateVar Version Source
Returns the GLFW C library version numbers.
Window Handling
openWindow :: Size -> [DisplayBits] -> WindowMode -> IO Bool Source
Open a window. Returns True
if successful, False
otherwise. GLFW
applications can only open one window.
If width is zero and height is not, width will be calculated as width = 4/3 height.
If height is zero and width is not, height will be calculated as height = 3/4 width.
If both width and height are zero, width is set to 640 and height to 480.
Display bits default to 0 if no value is specified, meaning that particular buffer is not created.
In fullscreen mode a resolution that best matches the given window dimensions will be chosen.
In fullscreen mode the mouse cursor is hidden by default. To change the visibility of the mouse
cursor, see, enableSpecial
and disableSpecial
.
closeWindow :: IO () Source
Close the open window and destroy the associated OpenGL context.
windowTitle :: SettableStateVar String Source
Set the title of the opened window.
windowSize :: StateVar Size Source
Get or set the size of the opened window.
The dimensions denote the size of the client area of the window (i.e. excluding any window borders and decorations).
If the window is in fullscreen mode when setting new dimensions, the video mode will be changed to a resolution that closest matches the given dimensions.
The setter has no effect if the window is iconified.
The OpenGL context is guaranteed to be preserved when the window is resized.
windowPos :: SettableStateVar Position Source
Set the position of the opened window.
The setter has no effect in fullscreen mode or if the window is iconified.
On multi-monitor systems, the behavior of the setter is ill-defined.
iconifyWindow :: IO () Source
Iconify the window.
restoreWindow :: IO () Source
Restore the window after iconification.
swapBuffers :: IO () Source
Swap the back and front color buffers of the window. If AutoPollEvent
is
enabled by enableSpecial
(which is the default), it also polls for new
events before the swapping.
swapInterval :: SettableStateVar Int Source
Set the minimum number of monitor retraces between each each buffer swap
performed by swapBuffers
. If set to zero, buffer swaps will not be
synchronized to the vertical refresh of the monitor.
Video Modes
videoModes :: GettableStateVar [VideoMode] Source
Get a list of detected VideoMode
s, the max number of which is limited to
256 for now.
desktopMode :: GettableStateVar VideoMode Source
Get the VideoMode
of current desktop.
Input Handling
pollEvents :: IO () Source
Poll events, such as user input and window events. Upon calling this
function, all window states, keyboard states and mouse states are updated.
If any related callback functions are registered, these are called during
the call of pollEvents
.
pollEvents
is called implicitly from swapBuffers
if AutoPollEvent
is
enabled (as it is by default).
waitEvents :: IO () Source
Wait for events, such as user input and window events. The calling thread
will be put to sleep until any event appears in the event queue.
When events are ready, the events will be processed just as they are
processed by pollEvents
.
getKey :: Enum a => a -> IO KeyButtonState Source
Return a KeyButtonState
, either Release
or Press
, of the indicated
key.
A window must be opened for the function to have any effect, and pollEvents
,
waitEvents
or swapBuffers
(with AutoPollEvent
enabled) must be called
before any keyboard events are recorded and reported by getKey
.
getMouseButton :: MouseButton -> IO KeyButtonState Source
Return a KeyButtonState
, either Release
or Press
, of the indicated
mouse button.
A window must be opened for the function to have any effect, and pollEvents
,
waitEvents
or swapBuffers
(with AutoPollEvent
enabled) must be called
before any mouse events are recorded and reported by getMouseButton
.
mousePos :: StateVar Position Source
Set or get the mouse position.
A window must be opened for the getter to have any effect, and pollEvents
,
waitEvents
or swapBuffers
(with AutoPollEvent
enabled) must be called
before any mouse movements are recorded and reported by mousePos
.
When setting the mouse position, if the cursor is visible (not disabled), the cursor will be moved to the specified position, relative to the upper left corner of the window client area and with the Y-axis down. If the cursor is hidden (disabled), only the mouse position that is reported by the getter is changed.
mouseWheel :: StateVar Int Source
Set or get the mouse wheel position.
A window must be opened for the getter to have any effect, and pollEvents
,
waitEvents
or swapBuffers
(with AutoPollEvent
enabled) must be called
before any wheel movements are recorded and reported by mouseWheel
.
joystickParam :: Joystick -> JoystickParam -> GettableStateVar CInt Source
Get joystick parameters.
The joystick information is updated every time the getter is queried.
No window has to be opened for joystick information to be available.
joystickPos :: Joystick -> Int -> GettableStateVar [Float] Source
Get a certain number of axis positions for the given joystick. If the number of positions requested is is greater than the number available, the unavailable positions will be 0.
The joystick state is updated every time the getter is queried.
No window has to be opened for joystick input to be available.
joystickPos' :: Joystick -> GettableStateVar [Float] Source
Get joystick positions. The returned list contains the positions for all available axes for the given joystick.
The joystick state is updated every time the getter is queried.
No window has to be opened for joystick input to be available.
joystickButtons :: Joystick -> GettableStateVar [KeyButtonState] Source
Get joystick button states. The returned list contains the states for all available buttons for the given joystick.
The joystick state is updated every time the getter is queried.
No window has to be opened for joystick input to be available.
Callbacks
Window callbacks
windowSizeCallback :: SettableStateVar WindowSizeCallback Source
Set the function that will be called every time the window size changes.
windowCloseCallback :: SettableStateVar WindowCloseCallback Source
Set the function that will be called when the window is closed.
windowRefreshCallback :: SettableStateVar WindowRefreshCallback Source
Set the function that will be called when the window client area needs to be refreshed, which occurs when any part of the window client area is damaged and needs to be repainted (for instance, if a part of the window that was previously occluded by another window has become visible).
Input callbacks
keyCallback :: SettableStateVar KeyCallback Source
Set the function that will be called when there is a key event, i.e., every time the state of a single key is changed. The reported keys are unaffected by any modifiers (such as SHIFT or ALT).
charCallback :: SettableStateVar CharCallback Source
Set the function that will be called when there is a character event, i.e., every time a key that results in a printable Unicode character is pressed or released. Characters are affected by modifiers (such as SHIFT or ALT).
mouseButtonCallback :: SettableStateVar MouseButtonCallback Source
Set the function that will be called when there is a mouse button event, i.e., every time a mouse button is pressed or released.
mousePosCallback :: SettableStateVar MousePosCallback Source
Set the function that will be called when there is a mouse motion event, i.e., every time they mouse is moved.
mouseWheelCallback :: SettableStateVar MouseWheelCallback Source
Set the function that will be called when there is a mouse wheel event, i.e., every time the mouse wheel is turned.
Timing
time :: StateVar Double Source
Get or set the value of the high precision timer. The time is measured in seconds as a double precision floating point number.
Unless the timer has been set by the programmer, the time is measured as
the number of seconds that have passed since initialize
was called.
The resolution of the timer depends on which system the program is running on.
sleep :: Double -> IO () Source
Put the calling thread to sleep for the requested period of time in seconds.
The minimum amount of time it is possible to sleep is generally in the range 1ms to 20ms.
OpenGL Extension Support
extensionSupported :: String -> IO Bool Source
glVersion :: GettableStateVar Version Source
Returns the version numbers for the currently used OpenGL implementation.
Texture loading
loadTexture2D :: String -> [TextureFlag] -> IO Bool Source
Read an image from a file specified by the given string and upload the image to OpenGL texture memory.
If BuildMipMaps flag is given, all mipmap levels for the loaded texture are generated and uploaded to texture memory.
Unless the OriginUL flag is given, the origin of the texture is the lower left corner of the loaded image. If OriginUL is given, however, the first pixel is the upper left corner.
For single component images (i.e. gray scale), the texture is uploaded as an alpha mask if the flag AlphaMap is set, otherwise it's uploaded as a luminance texture.
It only supports the Truevision Targa verson 1 file (.tga). Supported pixel formats are: 8-bit gray scale, 8-bit paletted (24/32-bit color), 24-bit true color and 32-bit true color + alpha.
Paletted images are translated into true color or true color + alpha pixel formats.
The read texture is always rescaled to the nearest larger 2^m x 2^n resolution using bilinear interpolation if necessary.
loadMemoryTexture2D :: String -> [TextureFlag] -> IO Bool Source
Read an image from the memory buffer (the given byte string) and
upload the image to OpenGL texture memory. The rest is similar
to loadTexture2D
.
Text rendering
renderString :: BitmapFont -> String -> IO () Source
Render a text string using the given BitmapFont
. Text is rendered
through texture, and is only possible with alpha enabled.
Miscellaneous
enableSpecial :: SpecialFeature -> IO () Source
Enable a SpecialFeature
.
disableSpecial :: SpecialFeature -> IO () Source
Disable a SpecialFeature
.
Window parameters and hints
We use type families to organize Window params that
can be retrieved using getParam
of the Param
class.
The value of a param a
is of type ParamVal
a
,
where ParamVal
is a type family defined as follows:
ParamVal Opened = Bool ParamVal Active = Bool ParamVal Iconified = Bool ParamVal Accelerated = Bool ParamVal RedBits = Int ParamVal GreenBits = Int ParamVal BlueBits = Int ParamVal AlphaBits = Int ParamVal DepthBits = Int ParamVal StencilBits = Int
The following are both params and hints that can be set using
openWindowHint
of the Hint
class.
ParamVal RefreshRate = Int ParamVal AccumRedBits = Int ParamVal AccumGreenBits = Int ParamVal AccumBlueBits = Int ParamVal AccumAlphaBits = Int ParamVal AuxBuffers = Int ParamVal Stereo = Bool ParamVal NoResize = Bool ParamVal FSAASamples = Int ParamVal OpenGLVersionMajor = Int ParamVal OpenGLVersionMinor = Int ParamVal OpenGLForwardCompat = Bool ParamVal OpenGLDebugContext = Bool ParamVal OpenGLProfile = Profile
type ParamVal OpenGLProfile = Profile Source | |
type ParamVal OpenGLDebugContext = Bool Source | |
type ParamVal OpenGLForwardCompat = Bool Source | |
type ParamVal OpenGLVersionMinor = Int Source | |
type ParamVal OpenGLVersionMajor = Int Source | |
type ParamVal FSAASamples = Int Source | |
type ParamVal NoResize = Bool Source | |
type ParamVal Stereo = Bool Source | |
type ParamVal AuxBuffers = Int Source | |
type ParamVal AccumAlphaBits = Int Source | |
type ParamVal AccumBlueBits = Int Source | |
type ParamVal AccumGreenBits = Int Source | |
type ParamVal AccumRedBits = Int Source | |
type ParamVal RefreshRate = Int Source | |
type ParamVal StencilBits = Int Source | |
type ParamVal DepthBits = Int Source | |
type ParamVal AlphaBits = Int Source | |
type ParamVal BlueBits = Int Source | |
type ParamVal GreenBits = Int Source | |
type ParamVal RedBits = Int Source | |
type ParamVal Accelerated = Bool Source | |
type ParamVal Iconified = Bool Source | |
type ParamVal Active = Bool Source | |
type ParamVal Opened = Bool Source |
Param OpenGLProfile Source | Query the OpenGL |
Param OpenGLDebugContext Source | Query whether the current OpenGL context is a debug context. |
Param OpenGLForwardCompat Source | Query whether the current OpenGL context is forward-compatible. |
Param OpenGLVersionMinor Source | Query the OpenGL minor version. |
Param OpenGLVersionMajor Source | Query the OpenGL major version. |
Param FSAASamples Source | Query the number used for the multisampling buffer. |
Param NoResize Source | Query whether the window can be resized by the user. |
Param Stereo Source | Query whether the window supports stereo rendering. |
Param AuxBuffers Source | Query the number of auxiliary buffers. |
Param AccumAlphaBits Source | Query the number of bits for the alpha channel of the accumulation buffer. |
Param AccumBlueBits Source | Query the number of bits for the blue channel of the accumulation buffer. |
Param AccumGreenBits Source | Query the number of bits for the green channel of the accumulation buffer. |
Param AccumRedBits Source | Query the number of bits for the red channel of the accumulation buffer. |
Param RefreshRate Source | Query the vertical monitor refresh rate in Hz (only used for fullscreen windows). |
Param StencilBits Source | Query the number of bits for the stencil buffer. |
Param DepthBits Source | Query the number of bits for the depth buffer. |
Param AlphaBits Source | Query the number of bits for the alpha buffer. |
Param BlueBits Source | Query the number of bits for the blue color component. |
Param GreenBits Source | Query the number of bits for the green color component. |
Param RedBits Source | Query the number of bits for the red color component. |
Param Accelerated Source | Query the window hardware accelerated status. |
Param Iconified Source | Query the window iconified status. |
Param Active Source | Query the window active status. |
Param Opened Source | Query the window opened status. |
class Param a => Hint a where Source
openWindowHint :: a -> ParamVal a -> IO () Source
Hint OpenGLProfile Source | Specify the OpenGL profile the context should implement. For available profiles see |
Hint OpenGLDebugContext Source | Specify whether a debug context should be created. |
Hint OpenGLForwardCompat Source | Specify whether the OpenGL context should be forward-compatible (i.e. disallow legacy functionality). This should only be used when requesting OpenGL version 3.0 or above. |
Hint OpenGLVersionMinor Source | Specify the minor number of the desired minimum OpenGL version. |
Hint OpenGLVersionMajor Source | Specify the major number of the desired minimum OpenGL version. |
Hint FSAASamples Source | Specify the number of samples to use for the multisampling buffer. |
Hint NoResize Source | Specify whether the window can be resized by the user. |
Hint Stereo Source | Specify if stereo rendering should be supported.
If Stereo is requested on a call to |
Hint AuxBuffers Source | Specify the number of auxiliary buffers. |
Hint AccumAlphaBits Source | Specify the number of bits for the alpha channel of the accumulation buffer. |
Hint AccumBlueBits Source | Specify the number of bits for the blue channel of the accumulation buffer. |
Hint AccumGreenBits Source | Specify the number of bits for the green channel of the accumulation buffer. |
Hint AccumRedBits Source | Specify the number of bits for the red channel of the accumulation buffer. |
Hint RefreshRate Source | Vertical monitor refresh rate in Hz (only used for fullscreen windows). Zero means system default. Use with caution: specifying a refresh rate can override the system's settings, in which case the display may be suboptimal, fail or even damage the monitor. |
data Accelerated Source
Param Accelerated Source | Query the window hardware accelerated status. |
type ParamVal Accelerated = Bool Source |
data StencilBits Source
Param StencilBits Source | Query the number of bits for the stencil buffer. |
type ParamVal StencilBits = Int Source |
data RefreshRate Source
Hint RefreshRate Source | Vertical monitor refresh rate in Hz (only used for fullscreen windows). Zero means system default. Use with caution: specifying a refresh rate can override the system's settings, in which case the display may be suboptimal, fail or even damage the monitor. |
Param RefreshRate Source | Query the vertical monitor refresh rate in Hz (only used for fullscreen windows). |
type ParamVal RefreshRate = Int Source |
data AccumRedBits Source
Hint AccumRedBits Source | Specify the number of bits for the red channel of the accumulation buffer. |
Param AccumRedBits Source | Query the number of bits for the red channel of the accumulation buffer. |
type ParamVal AccumRedBits = Int Source |
data AccumGreenBits Source
Hint AccumGreenBits Source | Specify the number of bits for the green channel of the accumulation buffer. |
Param AccumGreenBits Source | Query the number of bits for the green channel of the accumulation buffer. |
type ParamVal AccumGreenBits = Int Source |
data AccumBlueBits Source
Hint AccumBlueBits Source | Specify the number of bits for the blue channel of the accumulation buffer. |
Param AccumBlueBits Source | Query the number of bits for the blue channel of the accumulation buffer. |
type ParamVal AccumBlueBits = Int Source |
data AccumAlphaBits Source
Hint AccumAlphaBits Source | Specify the number of bits for the alpha channel of the accumulation buffer. |
Param AccumAlphaBits Source | Query the number of bits for the alpha channel of the accumulation buffer. |
type ParamVal AccumAlphaBits = Int Source |
data AuxBuffers Source
Hint AuxBuffers Source | Specify the number of auxiliary buffers. |
Param AuxBuffers Source | Query the number of auxiliary buffers. |
type ParamVal AuxBuffers = Int Source |
Hint Stereo Source | Specify if stereo rendering should be supported.
If Stereo is requested on a call to |
Param Stereo Source | Query whether the window supports stereo rendering. |
type ParamVal Stereo = Bool Source |
data FSAASamples Source
Hint FSAASamples Source | Specify the number of samples to use for the multisampling buffer. |
Param FSAASamples Source | Query the number used for the multisampling buffer. |
type ParamVal FSAASamples = Int Source |
data OpenGLVersionMajor Source
Hint OpenGLVersionMajor Source | Specify the major number of the desired minimum OpenGL version. |
Param OpenGLVersionMajor Source | Query the OpenGL major version. |
type ParamVal OpenGLVersionMajor = Int Source |
data OpenGLVersionMinor Source
Hint OpenGLVersionMinor Source | Specify the minor number of the desired minimum OpenGL version. |
Param OpenGLVersionMinor Source | Query the OpenGL minor version. |
type ParamVal OpenGLVersionMinor = Int Source |
data OpenGLForwardCompat Source
Hint OpenGLForwardCompat Source | Specify whether the OpenGL context should be forward-compatible (i.e. disallow legacy functionality). This should only be used when requesting OpenGL version 3.0 or above. |
Param OpenGLForwardCompat Source | Query whether the current OpenGL context is forward-compatible. |
type ParamVal OpenGLForwardCompat = Bool Source |
data OpenGLDebugContext Source
Hint OpenGLDebugContext Source | Specify whether a debug context should be created. |
Param OpenGLDebugContext Source | Query whether the current OpenGL context is a debug context. |
type ParamVal OpenGLDebugContext = Bool Source |
data OpenGLProfile Source
Hint OpenGLProfile Source | Specify the OpenGL profile the context should implement. For available profiles see |
Param OpenGLProfile Source | Query the OpenGL |
type ParamVal OpenGLProfile = Profile Source |
OpenGL profiles, used in openWindowHint
with OpenGLProfile
.