typos typos and typos

This commit is contained in:
nek0 2020-02-06 05:19:07 +01:00
parent a6a6b4ad8d
commit 9a9bd295cb

View file

@ -3,17 +3,16 @@ module Renderer where
import SDL (($=)) import SDL (($=))
import qualified Graphics.Rendering.OpenGL as GL import qualified Graphics.Rendering.OpenGL as GL
import qualified Graphics.GLUtil as GLU
import Foreign import Foreign
initRenderData = do initRenderData = do
quadVAO <- GL.genObjectName quadVAO <- GL.genObjectName
quadVBO <- GL.genObjectname quadVBO <- GL.genObjectName
GL.bindBuffer GL.ArrayBuffer $= Just quadVBO GL.bindBuffer GL.ArrayBuffer $= Just quadVBO
withArray rawVertices $ \ptr -> withArray rawVertices $ \ptr ->
GL.bufferData Gl.ArrayBuffer $= GL.bufferData GL.ArrayBuffer $=
( fromIntegral $ length rawVertices * sizeOf (0 :: Float) ( fromIntegral $ length rawVertices * sizeOf (0 :: Float)
, ptr , ptr
, GL.StaticDraw , GL.StaticDraw
@ -21,11 +20,11 @@ initRenderData = do
GL.bindVertexArrayObject $= Just quadVAO 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.ToFloat
, GL.VertesArrayDescriptor 4 GL.Float 0 (plusPtr nullptr 0) , GL.VertexArrayDescriptor 4 GL.Float 0 (plusPtr nullPtr 0)
) )
GL.bindBuffer GL.ArrayBuffer $= Nothing GL.bindBuffer GL.ArrayBuffer $= Nothing