diff --git a/app/Renderer.hs b/app/Renderer.hs index 9bddb10..005f883 100644 --- a/app/Renderer.hs +++ b/app/Renderer.hs @@ -3,17 +3,16 @@ module Renderer where import SDL (($=)) import qualified Graphics.Rendering.OpenGL as GL -import qualified Graphics.GLUtil as GLU import Foreign initRenderData = do quadVAO <- GL.genObjectName - quadVBO <- GL.genObjectname + quadVBO <- GL.genObjectName GL.bindBuffer GL.ArrayBuffer $= Just quadVBO withArray rawVertices $ \ptr -> - GL.bufferData Gl.ArrayBuffer $= + GL.bufferData GL.ArrayBuffer $= ( fromIntegral $ length rawVertices * sizeOf (0 :: Float) , ptr , GL.StaticDraw @@ -21,11 +20,11 @@ initRenderData = do GL.bindVertexArrayObject $= Just quadVAO - Gl.VertexattribArray (GL.AttribLocation 0) $= GL.Enabled + GL.vertexAttribArray (GL.AttribLocation 0) $= GL.Enabled - Gl.vertexAttribPointer (GL.AttribLocation 0) $= + GL.vertexAttribPointer (GL.AttribLocation 0) $= ( GL.ToFloat - , GL.VertesArrayDescriptor 4 GL.Float 0 (plusPtr nullptr 0) + , GL.VertexArrayDescriptor 4 GL.Float 0 (plusPtr nullPtr 0) ) GL.bindBuffer GL.ArrayBuffer $= Nothing