Open blitzcode opened 10 years ago
The existing extension string functionality is deprecated in modern OpenGL, would be nice if something along the lines of this could be added to the wrapper:
getNumExtensions :: IO Int getNumExtensions = alloca $ \(ptr :: Ptr GLR.GLint) -> GLR.glGetIntegerv GLR.gl_NUM_EXTENSIONS ptr >> fromIntegral <$> peek ptr getExtensionStr :: Int -> IO String getExtensionStr i = peekCString =<< castPtr <$> GLR.glGetStringi GLR.gl_EXTENSIONS (fromIntegral i) getGLExtensionList :: IO [String] getGLExtensionList = getNumExtensions >>= \numExt -> forM [0..numExt - 1] $ \i -> getExtensionStr i
The existing extension string functionality is deprecated in modern OpenGL, would be nice if something along the lines of this could be added to the wrapper: