extract size alongside data when reding in textures
This commit is contained in:
parent
ada9c1368f
commit
cf520852d0
1 changed files with 2 additions and 2 deletions
|
@ -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_ =
|
||||
|
|
Loading…
Reference in a new issue