Skip to content

Add a display mode for macOS's GLUT_3_2_CORE_PROFILE #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Graphics/UI/GLUT/Initialization.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -286,6 +289,7 @@ marshalDisplayMode m = case m of
Captionless -> glut_CAPTIONLESS
Borderless -> glut_BORDERLESS
SRGBMode -> glut_SRGB
MacOSCore32Profile -> glut_3_2_CORE_PROFILE

--------------------------------------------------------------------------------

Expand Down
3 changes: 3 additions & 0 deletions src/Graphics/UI/GLUT/Raw/Tokens.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down