From 38a7c098ddeefe4c6b49bb21d558c4539a4bb7fc Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 17 May 2020 13:04:13 +0200 Subject: [PATCH] use OpenGL's internal datatypes --- src/Main.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index cb93d89..cee5df1 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -73,10 +73,10 @@ main = do , 0.5 , (-0.5) -- 1 , 0.5 , 0.5 -- 2 , (-0.5), 0.5 -- 3 - ] :: [Float] + ] :: [GL.GLfloat] -- create draw order indices - indices = [0, 1, 2, 2, 3, 0] :: [Word] + indices = [0, 1, 2, 2, 3, 0] :: [GL.GLuint] -- create and bind buffer for vertices buf <- GL.genObjectName @@ -88,7 +88,7 @@ main = do -- Feed the data to the buffer GL.bufferData GL.ArrayBuffer $= -- how much bytes of memory we are going to write (as an Int32) - ( fromIntegral $ length vertexPositions * sizeOf (undefined :: Float) + ( fromIntegral $ length vertexPositions * sizeOf (undefined :: GL.GLfloat) -- The pointer to the data , ptr -- The data's usage @@ -120,7 +120,7 @@ main = do -- Feed the data to the buffer GL.bufferData GL.ElementArrayBuffer $= -- how much bytes of memory we are going to write (as an Int32) - ( fromIntegral $ length indices * sizeOf (undefined :: Word) + ( fromIntegral $ length indices * sizeOf (undefined :: GL.GLuint) -- The pointer to the data , ptr -- The data's usage