A set of default options for OpenGLConfig
defaultOpenGL = OpenGLConfig
{ glColorPrecision = V4 8 8 8 0
, glDepthPrecision = 24
, glStencilPrecision = 8
, glMultisampleSamples = 1
, glProfile = Compatibility Normal 2 1
}
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulesdl2-2.5.5.0Haskell2010
A set of default options for OpenGLConfig
defaultOpenGL = OpenGLConfig
{ glColorPrecision = V4 8 8 8 0
, glDepthPrecision = 24
, glStencilPrecision = 8
, glMultisampleSamples = 1
, glProfile = Compatibility Normal 2 1
}
Configuration used when creating an OpenGL rendering context.
OpenGLConfigglColorPrecision :: V4 CIntDefaults to V4 8 8 8 0.
glDepthPrecision :: CIntDefaults to 24.
glStencilPrecision :: CIntDefaults to 8.
glMultisampleSamples :: CIntDefaults to 1.
glProfile :: ProfileDefaults to Compatibility Normal 2 1.
Eq OpenGLConfigDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLOrd OpenGLConfigDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLRead OpenGLConfigDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLShow OpenGLConfigDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLGeneric OpenGLConfigDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLtype Rep OpenGLConfig = D1 ('MetaData "OpenGLConfig"
"SDL.Video.OpenGL"
"sdl2-2.5.5.0-3sH3mgPhw4837qWuaPOiH"
'False) (C1 ('MetaCons "OpenGLConfig"
'PrefixI 'True) ((S1 ('MetaSel ('Just "glColorPrecision"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V4 CInt)) :*: S1 ('MetaSel ('Just "glDepthPrecision"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt)) :*: (S1 ('MetaSel ('Just "glStencilPrecision"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt) :*: (S1 ('MetaSel ('Just "glMultisampleSamples"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt) :*: S1 ('MetaSel ('Just "glProfile"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Profile)))))Defined in sdl2-2.5.5.0 · SDL.Video.OpenGLA created OpenGL context.
Create a new OpenGL context and makes it the current context for the window.
Throws SDLException if the window wasn't configured with OpenGL
support, or if context creation fails.
See SDL_GL_CreateContext for C documentation.
The profile a driver should use when creating an OpenGL context.
Core Mode CInt CIntUse the OpenGL core profile, with a given major and minor version
Compatibility Mode CInt CIntUse the compatibilty profile with a given major and minor version. The compatibility profile allows you to use deprecated functions such as immediate mode
ES Mode CInt CIntUse an OpenGL profile for embedded systems
Eq ProfileDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLOrd ProfileDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLRead ProfileDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLShow ProfileDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLGeneric ProfileDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLtype Rep Profile = D1 ('MetaData "Profile"
"SDL.Video.OpenGL"
"sdl2-2.5.5.0-3sH3mgPhw4837qWuaPOiH"
'False) (C1 ('MetaCons "Core"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Mode) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt))) :+: (C1 ('MetaCons "Compatibility"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Mode) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt))) :+: C1 ('MetaCons "ES"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Mode) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt)))))Defined in sdl2-2.5.5.0 · SDL.Video.OpenGLThe mode a driver should use when creating an OpenGL context.
Bounded ModeDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLEnum ModeDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLEq ModeDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLData ModeDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLOrd ModeDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLRead ModeDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLShow ModeDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLGeneric ModeDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLtype Rep Mode = D1 ('MetaData "Mode"
"SDL.Video.OpenGL"
"sdl2-2.5.5.0-3sH3mgPhw4837qWuaPOiH"
'False) (C1 ('MetaCons "Normal"
'PrefixI 'False) U1 :+: C1 ('MetaCons "Debug"
'PrefixI 'False) U1)Defined in sdl2-2.5.5.0 · SDL.Video.OpenGLSet up an OpenGL context for rendering into an OpenGL window.
Throws SDLException on failure.
See SDL_GL_MakeCurrent for C documentation.
Delete the given OpenGL context.
You must make sure that there are no pending commands in the OpenGL command queue, the driver may still be processing commands even if you have stopped issuing them!
The glFinish command will block until the command queue has been fully
processed. You should call that function before deleting a context.
See SDL_GL_DeleteContext for C documentation.
Get the size of a window's underlying drawable area in pixels (for use with glViewport).
It may differ from windowSize if window was created with windowHighDPI flag.
The process of "swapping" means to move the back-buffer into the window contents itself.
Replace the contents of the front buffer with the back buffer's. The
contents of the back buffer are undefined, clear them with glClear or
equivalent before drawing to them again.
See SDL_GL_SwapWindow for C documentation.
The swap interval for the current OpenGL context.
ImmediateUpdatesNo vertical retrace synchronization
SynchronizedUpdatesThe buffer swap is synchronized with the vertical retrace
LateSwapTearingBounded SwapIntervalDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLEnum SwapIntervalDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLEq SwapIntervalDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLData SwapIntervalDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLOrd SwapIntervalDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLRead SwapIntervalDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLShow SwapIntervalDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLGeneric SwapIntervalDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLToNumber SwapInterval CIntDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLFromNumber SwapInterval CIntDefined in sdl2-2.5.5.0 · SDL.Video.OpenGLtype Rep SwapInterval = D1 ('MetaData "SwapInterval"
"SDL.Video.OpenGL"
"sdl2-2.5.5.0-3sH3mgPhw4837qWuaPOiH"
'False) (C1 ('MetaCons "ImmediateUpdates"
'PrefixI 'False) U1 :+: (C1 ('MetaCons "SynchronizedUpdates"
'PrefixI 'False) U1 :+: C1 ('MetaCons "LateSwapTearing"
'PrefixI 'False) U1))Defined in sdl2-2.5.5.0 · SDL.Video.OpenGLGet or set the swap interval for the current OpenGL context.
This StateVar can be modified using $= and the current value retrieved with get.
See SDL_GL_SetSwapInterval and SDL_GL_GetSwapInterval for C documentation.