Minimal Haskell OpenGL Example causes OpenGL Error -
i toying opengl example , ran problem. minimized 1 of mainstream haskell/opengl examples. windows 10, haskell platform (32-bit 8.0.2-a. positive it's -a variant).
import graphics.ui.glut main :: io () main = (_progname, _args) <- getargsandinitialize _window <- createwindow "hello world" displaycallback $= display mainloop display = let color3f r g b = color $ color3 r g (b :: glfloat) vertex3f x y z = vertex $ vertex3 x y (z :: glfloat) clear [colorbuffer] renderprimitive points $ -- color3f 1 0 0 -- vertex3f 0 0 0 return () -- << error on glend() of renderprimtive >> flush reporterrors
facts:
i've tried default
glut32.dll
comes haskell platform (ghc 8.0.2) , triedfreeglut
. using gdebugger, able determineglend
command reports error first (calledrenderprimtive
). no body (vertices or color changes), render issues command makes opengl unhappy (, or empty command generates different error).i tried other primitives
lines
, example program link above (usesquads
).the primitives render correctly on screen error. (but desire error checking own screw ups, false positive bad.)
does have idea how go debugging this? thanks!
Comments
Post a Comment