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) , tried freeglut. using gdebugger, able determine glend command reports error first (called renderprimtive). 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 (uses quads).

  • 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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -