From 3fdbbf4e61499774fe4542e8707c93f5c3f2058c Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Tue, 2 Oct 2018 11:29:57 +0100 Subject: [PATCH] Add a display mode for macOS's GLUT_3_2_CORE_PROFILE --- src/Graphics/UI/GLUT/Initialization.hs | 4 ++++ src/Graphics/UI/GLUT/Raw/Tokens.hs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/Graphics/UI/GLUT/Initialization.hs b/src/Graphics/UI/GLUT/Initialization.hs index ab2066e..0eb6596 100644 --- a/src/Graphics/UI/GLUT/Initialization.hs +++ b/src/Graphics/UI/GLUT/Initialization.hs @@ -260,6 +260,9 @@ data DisplayMode -- ^ Select a window without any borders (/freeglut only/). | SRGBMode -- ^ Select an sRGB mode window (/freeglut only/). + | MacOSCore32Profile + -- ^ Select a window with support for OpenGL 3.2 core profile + -- (/macOS system GLUT only/). deriving ( Eq, Ord, Show ) marshalDisplayMode :: DisplayMode -> CUInt @@ -286,6 +289,7 @@ marshalDisplayMode m = case m of Captionless -> glut_CAPTIONLESS Borderless -> glut_BORDERLESS SRGBMode -> glut_SRGB + MacOSCore32Profile -> glut_3_2_CORE_PROFILE -------------------------------------------------------------------------------- diff --git a/src/Graphics/UI/GLUT/Raw/Tokens.hs b/src/Graphics/UI/GLUT/Raw/Tokens.hs index 4b897c7..4bb0510 100644 --- a/src/Graphics/UI/GLUT/Raw/Tokens.hs +++ b/src/Graphics/UI/GLUT/Raw/Tokens.hs @@ -18,6 +18,9 @@ module Graphics.UI.GLUT.Raw.Tokens where import Foreign.C.Types ( CInt, CUInt ) import Graphics.Rendering.OpenGL ( GLenum ) +glut_3_2_CORE_PROFILE :: CUInt +glut_3_2_CORE_PROFILE = 0x0800 + glut_ACCUM :: CUInt glut_ACCUM = 0x0004