-- * OpenGL Extensions

-- | Checks whether the given extensions are available and fails with an exception otherwise.
requireExtensions :: [String] -> IO ()
requireExtensions required = do
  available <- openGLExtensions
  let missing = required \\ available
  when (not $ null missing) $ do
    throwIO (ExtensionsUnavailable missing)

-- | Returns a list of all available OpenGL extensions.
requireExtensions :: [String] -> IO ()
requireExtensions required = do
  available <- openGLExtensions
  let missing = required \\ available
  when (not $ null missing) $ do
    throwIO (ExtensionsUnavailable missing)

-- | Returns a list of all available OpenGL extensions.
requireExtensions required = do
  available <- openGLExtensions
  let missing = required \\ available
  when (not $ null missing) $ do
    throwIO (ExtensionsUnavailable missing)

-- | Returns a list of all available OpenGL extensions.