Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
src/Nxt/Graphics.hs: fix against opengl-2.9
> src/Nxt/Graphics.hs:91:5:
>     No instance for (TwoDimensionalTextureTarget (Maybe a0))
>       arising from a use of `texImage2D'

Reported by kini.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information
Sergei Trofimovich committed Nov 25, 2013
1 parent f1a122e commit 307c246
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Nxt/Graphics.hs
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
module Nxt.Graphics
(begin,
end,
Expand Down Expand Up @@ -88,7 +89,13 @@ loadTexture textureFilePath = do
surfacePixels <- surfaceGetPixels surface

let pixelData = PixelData RGBA UnsignedByte surfacePixels
texImage2D Nothing NoProxy 0 RGBA' surfaceSize 0 pixelData
texImage2D
#if MIN_VERSION_OpenGL(2,9,0)
Texture2D
#else
Nothing
#endif
NoProxy 0 RGBA' surfaceSize 0 pixelData

freeSurface surface

Expand Down

0 comments on commit 307c246

Please sign in to comment.