diff --git a/src/Texture.hs b/src/Texture.hs index de8dd60..fd14f42 100644 --- a/src/Texture.hs +++ b/src/Texture.hs @@ -19,7 +19,7 @@ import Foreign.Ptr import Classes.Bindable import Types.Texture -newTexture :: FilePath -> GL.GLuint -> IO Texture +newTexture :: FilePath -> GL.GLuint -> IO (V2 Word, Texture) newTexture fp slot = do -- read in image from filesystem @@ -56,7 +56,7 @@ newTexture fp slot = do -- free (texData tex) -- pass texture object out - return tex + return (fmap fromIntegral dimensions, tex) loadTexture :: Texture -> V2 GL.GLsizei -> Ptr () -> IO () loadTexture tex dimensions data_ =