Open
Description
The following minimal program calls glEnd
twice within renderPrimitive
. This is on Windows 32b package version OpenGL 3.0.0.2.
import Graphics.UI.GLUT
main :: IO ()
main = do
(_progName, _args) <- getArgsAndInitialize
_window <- createWindow "Hello World"
displayCallback $= display
mainLoop
display :: DisplayCallback
display = do
let vertex3f x y z = vertex (Vertex3 x y (z :: Float))
clear [ ColorBuffer ]
renderPrimitive Points $ do
vertex3f 0 0 0
putStrLn "rendering point"
get errors >>= print -- no error
putStrLn "after renderPrimitive" -- error here
get errors >>= print
flush
I've reproduced with GHC 8.0.1 and GHC 8.0.2. This pollutes the error state for programs.
OpenGL 2.9.0.2 on a Mac with GHC 7.8.3 does not exhibit the problem.
Metadata
Metadata
Assignees
Labels
No labels