aboutsummaryrefslogtreecommitdiff
path: root/Graphics/Glyph/Textures.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/Glyph/Textures.hs')
-rw-r--r--Graphics/Glyph/Textures.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Graphics/Glyph/Textures.hs b/Graphics/Glyph/Textures.hs
index 7e86d2a..ec3e12f 100644
--- a/Graphics/Glyph/Textures.hs
+++ b/Graphics/Glyph/Textures.hs
@@ -1,11 +1,10 @@
module Graphics.Glyph.Textures where
+import Control.Monad
import Data.Array.Storable
import Data.Word
-
-import Graphics.Rendering.OpenGL.Raw.Core31
+import Graphics.GL.Compatibility30
import Graphics.Rendering.OpenGL
-import Control.Monad
data Pixels =
PixelsRGB (Int,Int) (StorableArray Int Word8) |
@@ -32,8 +31,8 @@ attachPixelsToTexture pixels tex =
withStorableArray (pixelsArray pixels) $ \ptr -> do
textureBinding Texture2D $= Just tex
case pixels of
- PixelsRGB (w,h) _ -> glTexImage2D gl_TEXTURE_2D 0 3 (f w) (f h) 0 gl_RGB gl_UNSIGNED_BYTE ptr
- PixelsRGBA (w,h) _ -> glTexImage2D gl_TEXTURE_2D 0 4 (f w) (f h) 0 gl_RGBA gl_UNSIGNED_BYTE ptr
+ PixelsRGB (w,h) _ -> glTexImage2D GL_TEXTURE_2D 0 3 (f w) (f h) 0 GL_RGB GL_UNSIGNED_BYTE ptr
+ PixelsRGBA (w,h) _ -> glTexImage2D GL_TEXTURE_2D 0 4 (f w) (f h) 0 GL_RGBA GL_UNSIGNED_BYTE ptr
where f = fromIntegral