packages feed

OpenGL 2.3.0.0 → 2.4.0.0

raw patch · 21 files changed

+230/−182 lines, 21 filesdep ~GLURawdep ~ObjectNamedep ~OpenGLRawPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: GLURaw, ObjectName, OpenGLRaw

API changes (from Hackage documentation)

- Graphics.Rendering.OpenGL.GL.CoordTrans: instance MatrixComponent CDouble
- Graphics.Rendering.OpenGL.GL.CoordTrans: instance MatrixComponent CFloat
- Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap: instance PixelMapComponent CFloat
- Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap: instance PixelMapComponent CUInt
- Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap: instance PixelMapComponent CUShort
- Graphics.Rendering.OpenGL.GL.RasterPos: instance RasterPosComponent CDouble
- Graphics.Rendering.OpenGL.GL.RasterPos: instance RasterPosComponent CFloat
- Graphics.Rendering.OpenGL.GL.RasterPos: instance RasterPosComponent CInt
- Graphics.Rendering.OpenGL.GL.RasterPos: instance RasterPosComponent CShort
- Graphics.Rendering.OpenGL.GL.RasterPos: instance WindowPosComponent CDouble
- Graphics.Rendering.OpenGL.GL.RasterPos: instance WindowPosComponent CFloat
- Graphics.Rendering.OpenGL.GL.RasterPos: instance WindowPosComponent CInt
- Graphics.Rendering.OpenGL.GL.RasterPos: instance WindowPosComponent CShort
- Graphics.Rendering.OpenGL.GL.Rectangles: instance Rect CDouble
- Graphics.Rendering.OpenGL.GL.Rectangles: instance Rect CFloat
- Graphics.Rendering.OpenGL.GL.Rectangles: instance Rect CInt
- Graphics.Rendering.OpenGL.GL.Rectangles: instance Rect CShort
- Graphics.Rendering.OpenGL.GL.Shaders: instance UniformComponent CFloat
- Graphics.Rendering.OpenGL.GL.Shaders: instance UniformComponent CInt
- Graphics.Rendering.OpenGL.GL.Shaders: instance UniformComponent CUInt
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent CDouble
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent CFloat
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent CInt
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent CSChar
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent CShort
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent CUChar
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent CUInt
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent CUShort
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance FogCoordComponent CDouble
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance FogCoordComponent CFloat
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent CDouble
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent CFloat
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent CInt
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent CShort
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent CUChar
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent CDouble
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent CFloat
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent CInt
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent CSChar
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent CShort
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance TexCoordComponent CDouble
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance TexCoordComponent CFloat
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance TexCoordComponent CInt
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance TexCoordComponent CShort
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent CDouble
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent CFloat
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent CInt
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent CSChar
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent CShort
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent CUChar
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent CUInt
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent CUShort
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexComponent CDouble
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexComponent CFloat
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexComponent CInt
- Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexComponent CShort
+ Graphics.Rendering.OpenGL.GL.CoordTrans: instance MatrixComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.CoordTrans: instance MatrixComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap: instance PixelMapComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap: instance PixelMapComponent GLuint
+ Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap: instance PixelMapComponent GLushort
+ Graphics.Rendering.OpenGL.GL.RasterPos: instance RasterPosComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.RasterPos: instance RasterPosComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.RasterPos: instance RasterPosComponent GLint
+ Graphics.Rendering.OpenGL.GL.RasterPos: instance RasterPosComponent GLshort
+ Graphics.Rendering.OpenGL.GL.RasterPos: instance WindowPosComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.RasterPos: instance WindowPosComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.RasterPos: instance WindowPosComponent GLint
+ Graphics.Rendering.OpenGL.GL.RasterPos: instance WindowPosComponent GLshort
+ Graphics.Rendering.OpenGL.GL.Rectangles: instance Rect GLdouble
+ Graphics.Rendering.OpenGL.GL.Rectangles: instance Rect GLfloat
+ Graphics.Rendering.OpenGL.GL.Rectangles: instance Rect GLint
+ Graphics.Rendering.OpenGL.GL.Rectangles: instance Rect GLshort
+ Graphics.Rendering.OpenGL.GL.Shaders: instance UniformComponent GLclampf
+ Graphics.Rendering.OpenGL.GL.Shaders: instance UniformComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.Shaders: instance UniformComponent GLint
+ Graphics.Rendering.OpenGL.GL.Shaders: instance UniformComponent GLuint
+ Graphics.Rendering.OpenGL.GL.StringQueries: contextProfile :: GettableStateVar [ContextProfile']
+ Graphics.Rendering.OpenGL.GL.StringQueries: instance Eq ContextProfile'
+ Graphics.Rendering.OpenGL.GL.StringQueries: instance Ord ContextProfile'
+ Graphics.Rendering.OpenGL.GL.StringQueries: instance Show ContextProfile'
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLbyte
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLclampd
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLclampf
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLint
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLshort
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLubyte
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLuint
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance ColorComponent GLushort
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance FogCoordComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance FogCoordComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent GLint
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent GLshort
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance IndexComponent GLubyte
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent GLbyte
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent GLint
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance NormalComponent GLshort
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance TexCoordComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance TexCoordComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance TexCoordComponent GLint
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance TexCoordComponent GLshort
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLbyte
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLclampd
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLclampf
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLint
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLshort
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLubyte
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLuint
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexAttribComponent GLushort
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexComponent GLdouble
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexComponent GLfloat
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexComponent GLint
+ Graphics.Rendering.OpenGL.GL.VertexSpec: instance VertexComponent GLshort
- Graphics.Rendering.OpenGL.GL.Fog: fogColor :: StateVar (Color4 GLfloat)
+ Graphics.Rendering.OpenGL.GL.Fog: fogColor :: StateVar (Color4 GLclampf)
- Graphics.Rendering.OpenGL.GLU.Tessellation: WeightedProperties :: (GLclampf, v) -> (GLclampf, v) -> (GLclampf, v) -> (GLclampf, v) -> WeightedProperties v
+ Graphics.Rendering.OpenGL.GLU.Tessellation: WeightedProperties :: (GLfloat, v) -> (GLfloat, v) -> (GLfloat, v) -> (GLfloat, v) -> WeightedProperties v

Files

Graphics/Rendering/OpenGL/GL/CoordTrans.hs view
@@ -36,7 +36,6 @@  import Data.StateVar import Data.Tensor-import Foreign.C.Types import Foreign.ForeignPtr import Foreign.Marshal.Alloc import Foreign.Marshal.Array@@ -79,7 +78,7 @@ -- mappings such as (1, 0) are acceptable.  depthRange :: StateVar (GLclampd, GLclampd)-depthRange = makeStateVar (getDouble2 (,) GetDepthRange) (uncurry glDepthRange)+depthRange = makeStateVar (getClampd2 (,) GetDepthRange) (uncurry glDepthRange)  -------------------------------------------------------------------------------- @@ -116,7 +115,7 @@ -- | The implementation-dependent maximum viewport width and height.  maxViewportDims :: GettableStateVar Size-maxViewportDims = makeGettableStateVar (getInteger2 Size GetMaxViewportDims)+maxViewportDims = makeGettableStateVar (getSizei2 Size GetMaxViewportDims)  -------------------------------------------------------------------------------- @@ -200,8 +199,7 @@    translate :: Vector3 c -> IO ()    scale :: c -> c -> c -> IO () --- GLfloat instance-instance MatrixComponent CFloat where+instance MatrixComponent GLfloat where    getMatrix = getFloatv    loadMatrix = glLoadMatrixf    loadTransposeMatrix = glLoadTransposeMatrixf@@ -211,8 +209,7 @@    translate (Vector3 x y z) = glTranslatef x y z    scale = glScalef --- GLfloat instance-instance MatrixComponent CDouble where+instance MatrixComponent GLdouble where    getMatrix = getDoublev    loadMatrix = glLoadMatrixd    loadTransposeMatrix = glLoadTransposeMatrixd
Graphics/Rendering/OpenGL/GL/DisplayLists.hs view
@@ -130,7 +130,7 @@ listIndex :: GettableStateVar (Maybe DisplayList) listIndex =    makeGettableStateVar-      (do l <- getEnum1 DisplayList GetListIndex+      (do l <- getEnum1 (DisplayList . fromIntegral) GetListIndex           return $ if l == noDisplayList then Nothing else Just l)  noDisplayList :: DisplayList@@ -153,4 +153,7 @@ --------------------------------------------------------------------------------  listBase :: StateVar DisplayList-listBase = makeStateVar (getEnum1 DisplayList GetListBase) (\(DisplayList dl) -> glListBase dl)+listBase =+   makeStateVar+      (getEnum1 (DisplayList . fromIntegral) GetListBase)+       (\(DisplayList dl) -> glListBase dl)
Graphics/Rendering/OpenGL/GL/Domain.hs view
@@ -17,7 +17,6 @@    Domain(..) ) where -import Foreign.C.Types import Foreign.Ptr import Foreign.Storable import Graphics.Rendering.OpenGL.GL.QueryUtils@@ -45,8 +44,7 @@  -------------------------------------------------------------------------------- --- GLfloat instance-instance Domain CFloat where+instance Domain GLfloat where    glMap1      = glMap1f    glMap2      = glMap2f    glGetMapv   = glGetMapfv@@ -59,8 +57,7 @@    get2        = getFloat2    get4        = getFloat4 --- GLdouble instance-instance Domain CDouble where+instance Domain GLdouble where    glMap1      = glMap1d    glMap2      = glMap2d    glGetMapv   = glGetMapdv
Graphics/Rendering/OpenGL/GL/Evaluators.hs view
@@ -69,7 +69,7 @@ type Order = GLint  maxOrder :: GettableStateVar Order-maxOrder = makeGettableStateVar (getSizei1 id GetMaxEvalOrder)+maxOrder = makeGettableStateVar (getInteger1 id GetMaxEvalOrder)  -------------------------------------------------------------------------------- 
Graphics/Rendering/OpenGL/GL/Fog.hs view
@@ -131,9 +131,11 @@  -------------------------------------------------------------------------------- -fogColor :: StateVar (Color4 GLfloat)+fogColor :: StateVar (Color4 GLclampf) fogColor =-   makeStateVar (getFloat4 Color4 GetFogColor) (\c -> with c $ fogfv FogColor)+   makeStateVar+      (getClampf4 Color4 GetFogColor)+      (\c -> with c $ (fogfv FogColor . castPtr))  -------------------------------------------------------------------------------- 
Graphics/Rendering/OpenGL/GL/Framebuffer.hs view
@@ -252,7 +252,7 @@    deriving ( Eq, Ord, Show )  marshalClearBuffer :: ClearBuffer -> GLbitfield-marshalClearBuffer x = case x of+marshalClearBuffer x = fromIntegral $ case x of    ColorBuffer -> gl_COLOR_BUFFER_BIT    AccumBuffer -> gl_ACCUM_BUFFER_BIT    StencilBuffer -> gl_STENCIL_BUFFER_BIT@@ -287,7 +287,7 @@ -- [0, 1]. Initially, all values are 0.  clearColor :: StateVar (Color4 GLclampf)-clearColor = makeStateVar (getFloat4 Color4 GetColorClearValue)+clearColor = makeStateVar (getClampf4 Color4 GetColorClearValue)                           (\(Color4 r g b a) -> glClearColor r g b a)  --------------------------------------------------------------------------------@@ -309,7 +309,7 @@ -- is 1.  clearDepth :: StateVar GLclampd-clearDepth = makeStateVar (getDouble1 id GetDepthClearValue) glClearDepth+clearDepth = makeStateVar (getClampd1 id GetDepthClearValue) glClearDepth  -------------------------------------------------------------------------------- 
Graphics/Rendering/OpenGL/GL/PerFragment.hs view
@@ -93,7 +93,7 @@ sampleCoverage =    makeStateVarMaybe       (return CapSampleCoverage)-      (liftM2 (,) (getFloat1 id GetSampleCoverageValue)+      (liftM2 (,) (getClampf1 id GetSampleCoverageValue)                   (getBoolean1 unmarshalGLboolean GetSampleCoverageInvert))       (\(value, invert) -> glSampleCoverage value (marshalGLboolean invert)) @@ -103,7 +103,7 @@ depthBounds =    makeStateVarMaybe       (return CapDepthBoundsTest)-      (getDouble2 (,) GetDepthBounds)+      (getClampd2 (,) GetDepthBounds)       (uncurry glDepthBounds)  --------------------------------------------------------------------------------@@ -113,7 +113,7 @@    makeStateVarMaybe       (return CapAlphaTest)       (liftM2 (,) (getEnum1 unmarshalComparisonFunction GetAlphaTestFunc)-                  (getFloat1 id GetAlphaTestRef))+                  (getClampf1 id GetAlphaTestRef))       (uncurry (glAlphaFunc . marshalComparisonFunction))  --------------------------------------------------------------------------------@@ -389,7 +389,7 @@ blendColor :: StateVar (Color4 GLclampf) blendColor =    makeStateVar-      (getFloat4 Color4 GetBlendColor)+      (getClampf4 Color4 GetBlendColor)       (\(Color4 r g b a) -> glBlendColor r g b a)  --------------------------------------------------------------------------------
Graphics/Rendering/OpenGL/GL/PixelRectangles/Histogram.hs view
@@ -137,4 +137,4 @@ histogramLuminanceSize :: Proxy -> GettableStateVar GLsizei histogramLuminanceSize proxy =    makeGettableStateVar $-      getHistogramParameteri id proxy HistogramLuminanceSize+      getHistogramParameteri fromIntegral proxy HistogramLuminanceSize
Graphics/Rendering/OpenGL/GL/PixelRectangles/PixelMap.hs view
@@ -20,7 +20,6 @@  import Data.List import Data.StateVar-import Foreign.C.Types import Foreign.ForeignPtr import Foreign.Marshal.Array import Foreign.Ptr@@ -86,18 +85,15 @@    getPixelMapv :: GLenum -> Ptr c -> IO ()    pixelMapv :: GLenum -> GLsizei -> Ptr c -> IO () --- GLushort instance-instance PixelMapComponent CUShort where+instance PixelMapComponent GLushort where    getPixelMapv = glGetPixelMapusv    pixelMapv = glPixelMapusv --- GLuint instance-instance PixelMapComponent CUInt where+instance PixelMapComponent GLuint where    getPixelMapv = glGetPixelMapuiv    pixelMapv = glPixelMapuiv --- GLfloat instance-instance PixelMapComponent CFloat where+instance PixelMapComponent GLfloat where    getPixelMapv = glGetPixelMapfv    pixelMapv = glPixelMapfv 
Graphics/Rendering/OpenGL/GL/QueryUtils.hs view
@@ -20,9 +20,11 @@    getBoolean1, getBoolean4,    getInteger1, getInteger2, getInteger4, getIntegerv,    getEnum1,-   getSizei1,+   getSizei1, getSizei2,    getFloat1, getFloat2, getFloat3, getFloat4, getFloatv,+   getClampf1, getClampf4,    getDouble1, getDouble2, getDouble4, getDoublev,+   getClampd1, getClampd2,    maybeNullPtr,    AttribLocation(..), GetVertexAttribPName(..),    getVertexAttribInteger1, getVertexAttribEnum1, getVertexAttribBoolean1,@@ -124,7 +126,7 @@    gl_MODELVIEW1, gl_MODELVIEW2, gl_MODELVIEW31, gl_VERTEX_BLEND,    gl_WEIGHT_ARRAY, gl_WEIGHT_ARRAY_SIZE, gl_WEIGHT_ARRAY_STRIDE,    gl_WEIGHT_ARRAY_TYPE, gl_WEIGHT_SUM_UNITY )-import Graphics.Rendering.OpenGL.Raw.Core31+import Graphics.Rendering.OpenGL.Raw.Core32 import Graphics.Rendering.OpenGL.Raw.EXT ( gl_RGBA_SIGNED_COMPONENTS ) import Graphics.Rendering.OpenGL.Raw.EXT.Cmyka ( gl_PACK_CMYK_HINT, gl_UNPACK_CMYK_HINT ) import Graphics.Rendering.OpenGL.Raw.EXT.CompiledVertexArray ( gl_ARRAY_ELEMENT_LOCK_FIRST, gl_ARRAY_ELEMENT_LOCK_COUNT )@@ -523,6 +525,7 @@    | GetCopyReadBuffer    | GetCopyWriteBuffer    -- GetWeightArrayBufferBinding+   | GetContextProfileMask  marshalGetPName :: GetPName -> Maybe GLenum marshalGetPName x = case x of@@ -910,6 +913,7 @@    GetCopyReadBuffer -> Just gl_COPY_READ_BUFFER    GetCopyWriteBuffer -> Just gl_COPY_WRITE_BUFFER    -- GetWeightArrayBufferBinding -> Just gl_WEIGHT_ARRAY_BUFFER_BINDING+   GetContextProfileMask -> Just gl_CONTEXT_PROFILE_MASK  -------------------------------------------------------------------------------- @@ -1008,11 +1012,22 @@ --------------------------------------------------------------------------------  getEnum1 :: (GLenum -> a) -> GetPName -> IO a-getEnum1 f = getInteger1 (f . fromIntegral)+getEnum1 f n = alloca $ \buf -> do+   getIntegerv n buf+   peek1 f (castPtr buf) +--------------------------------------------------------------------------------+ getSizei1 :: (GLsizei -> a) -> GetPName -> IO a-getSizei1 f = getInteger1 (f . fromIntegral)+getSizei1 f n = alloca $ \buf -> do+   getIntegerv n buf+   peek1 f (castPtr buf) +getSizei2 :: (GLsizei -> GLsizei -> a) -> GetPName -> IO a+getSizei2 f n = allocaArray 2 $ \buf -> do+   getIntegerv n buf+   peek2 f (castPtr buf)+ --------------------------------------------------------------------------------  getFloat1 :: (GLfloat -> a) -> GetPName -> IO a@@ -1041,6 +1056,19 @@  -------------------------------------------------------------------------------- +getClampf1 :: (GLclampf -> a) -> GetPName -> IO a+getClampf1 f n = alloca $ \buf -> do+   getFloatv n buf+   peek1 f (castPtr buf)++getClampf4 ::+   (GLclampf -> GLclampf -> GLclampf -> GLclampf -> a) -> GetPName -> IO a+getClampf4 f n = allocaArray 4 $ \buf -> do+   getFloatv n buf+   peek4 f (castPtr buf)++--------------------------------------------------------------------------------+ getDouble1 :: (GLdouble -> a) -> GetPName -> IO a getDouble1 f n = alloca $ \buf -> do    getDoublev n buf@@ -1059,6 +1087,18 @@  getDoublev :: GetPName -> Ptr GLdouble -> IO () getDoublev = maybe (const recordInvalidEnum) glGetDoublev . marshalGetPName++--------------------------------------------------------------------------------++getClampd1 :: (GLclampd -> a) -> GetPName -> IO a+getClampd1 f n = alloca $ \buf -> do+   getDoublev n buf+   peek1 f (castPtr buf)++getClampd2 :: (GLclampd -> GLclampd -> a) -> GetPName -> IO a+getClampd2 f n = allocaArray 2 $ \buf -> do+   getDoublev n buf+   peek2 f (castPtr buf)  -------------------------------------------------------------------------------- 
Graphics/Rendering/OpenGL/GL/RasterPos.hs view
@@ -23,7 +23,6 @@  import Data.StateVar import Data.Tensor-import Foreign.C.Types import Foreign.Ptr import Graphics.Rendering.OpenGL.GL.Capability import Graphics.Rendering.OpenGL.GL.GLboolean@@ -57,8 +56,7 @@    rasterPos3v :: Ptr a -> IO ()    rasterPos4v :: Ptr a -> IO () --- GLshort instance-instance RasterPosComponent CShort where+instance RasterPosComponent GLshort where    rasterPos2 = glRasterPos2s    rasterPos3 = glRasterPos3s    rasterPos4 = glRasterPos4s@@ -67,8 +65,7 @@    rasterPos3v = glRasterPos3sv    rasterPos4v = glRasterPos4sv --- GLint instance-instance RasterPosComponent CInt where+instance RasterPosComponent GLint where    rasterPos2 = glRasterPos2i    rasterPos3 = glRasterPos3i    rasterPos4 = glRasterPos4i@@ -77,8 +74,7 @@    rasterPos3v = glRasterPos3iv    rasterPos4v = glRasterPos4iv --- GLfloat instance-instance RasterPosComponent CFloat where+instance RasterPosComponent GLfloat where    rasterPos2 = glRasterPos2f    rasterPos3 = glRasterPos3f    rasterPos4 = glRasterPos4f@@ -87,8 +83,7 @@    rasterPos3v = glRasterPos3fv    rasterPos4v = glRasterPos4fv --- GLdouble instance-instance RasterPosComponent CDouble where+instance RasterPosComponent GLdouble where    rasterPos2 = glRasterPos2d    rasterPos3 = glRasterPos3d    rasterPos4 = glRasterPos4d@@ -124,32 +119,28 @@    windowPos2v :: Ptr a -> IO ()    windowPos3v :: Ptr a -> IO () --- GLshort instance-instance WindowPosComponent CShort where+instance WindowPosComponent GLshort where    windowPos2 = glWindowPos2s    windowPos3 = glWindowPos3s     windowPos2v = glWindowPos2sv    windowPos3v = glWindowPos3sv --- GLint instance-instance WindowPosComponent CInt where+instance WindowPosComponent GLint where    windowPos2 = glWindowPos2i    windowPos3 = glWindowPos3i     windowPos2v = glWindowPos2iv    windowPos3v = glWindowPos3iv --- GLfloat instance-instance WindowPosComponent CFloat where+instance WindowPosComponent GLfloat where    windowPos2 = glWindowPos2f    windowPos3 = glWindowPos3f     windowPos2v = glWindowPos2fv    windowPos3v = glWindowPos3fv --- GLdouble instance-instance WindowPosComponent CDouble where+instance WindowPosComponent GLdouble where    windowPos2 = glWindowPos2d    windowPos3 = glWindowPos3d 
Graphics/Rendering/OpenGL/GL/Rectangles.hs view
@@ -17,10 +17,10 @@ ) where  import Data.Tensor-import Foreign.C.Types import Foreign.Ptr import Graphics.Rendering.OpenGL.Raw.ARB.Compatibility (    glRectd, glRectdv, glRectf, glRectfv, glRecti, glRectiv, glRects, glRectsv )+import Graphics.Rendering.OpenGL.Raw.Core31  -------------------------------------------------------------------------------- @@ -48,22 +48,18 @@    rect  :: Vertex2 a -> Vertex2 a -> IO ()    rectv :: Ptr     a -> Ptr     a -> IO () --- GLshort instance-instance Rect CShort where+instance Rect GLshort where    rect (Vertex2 x1 y1) (Vertex2 x2 y2) = glRects x1 y1 x2 y2    rectv ptr1 ptr2 = glRectsv ptr1 ptr2 --- GLint instance-instance Rect CInt where+instance Rect GLint where    rect (Vertex2 x1 y1) (Vertex2 x2 y2) = glRecti x1 y1 x2 y2    rectv ptr1 ptr2 = glRectiv ptr1 ptr2 --- GLfloat instance-instance Rect CFloat where+instance Rect GLfloat where    rect (Vertex2 x1 y1) (Vertex2 x2 y2) = glRectf x1 y1 x2 y2    rectv ptr1 ptr2 = glRectfv ptr1 ptr2 --- GLdouble instance-instance Rect CDouble where+instance Rect GLdouble where    rect (Vertex2 x1 y1) (Vertex2 x2 y2) = glRectd x1 y1 x2 y2    rectv ptr1 ptr2 = glRectdv ptr1 ptr2
Graphics/Rendering/OpenGL/GL/SavingState.hs view
@@ -58,7 +58,7 @@    deriving ( Eq, Ord, Show )  marshalServerAttributeGroup :: ServerAttributeGroup -> GLbitfield-marshalServerAttributeGroup x = case x of+marshalServerAttributeGroup x = fromIntegral $ case x of    CurrentAttributes -> gl_CURRENT_BIT    PointAttributes -> gl_POINT_BIT    LineAttributes -> gl_LINE_BIT@@ -99,7 +99,7 @@    deriving ( Eq, Ord, Show )  marshalClientAttributeGroup :: ClientAttributeGroup -> GLbitfield-marshalClientAttributeGroup x = case x of+marshalClientAttributeGroup x = fromIntegral $ case x of    PixelStoreAttributes -> gl_CLIENT_PIXEL_STORE_BIT    VertexArrayAttributes -> gl_CLIENT_VERTEX_ARRAY_BIT    AllClientAttributes -> gl_CLIENT_ALL_ATTRIB_BITS
Graphics/Rendering/OpenGL/GL/Shaders.hs view
@@ -42,7 +42,6 @@ import Data.StateVar import Data.Tensor import Foreign.C.String-import Foreign.C.Types import Foreign.Marshal.Alloc import Foreign.Marshal.Array import Foreign.Marshal.Utils@@ -135,7 +134,7 @@    withMany withGLStringLen srcs $ \charBufsAndLengths -> do       let (charBufs, lengths) = unzip charBufsAndLengths       withArray charBufs $ \charBufsBuf ->-         withArray lengths $ \lengthsBuf ->+         withArray (map fromIntegral lengths) $ \lengthsBuf ->             glShaderSource (shaderID shader) len charBufsBuf lengthsBuf  getShaderSource :: Shader s => s -> IO [String]@@ -521,8 +520,7 @@    uniform3v :: UniformLocation -> GLsizei -> Ptr a -> IO ()    uniform4v :: UniformLocation -> GLsizei -> Ptr a -> IO () --- GLint instance-instance UniformComponent CInt where+instance UniformComponent GLint where    uniform1 (UniformLocation ul) = glUniform1i ul    uniform2 (UniformLocation ul) = glUniform2i ul    uniform3 (UniformLocation ul) = glUniform3i ul@@ -535,8 +533,7 @@    uniform3v (UniformLocation ul) = glUniform3iv ul    uniform4v (UniformLocation ul) = glUniform4iv ul --- GLuint instance-instance UniformComponent CUInt where+instance UniformComponent GLuint where    uniform1 (UniformLocation ul) = glUniform1ui ul    uniform2 (UniformLocation ul) = glUniform2ui ul    uniform3 (UniformLocation ul) = glUniform3ui ul@@ -549,8 +546,7 @@    uniform3v (UniformLocation ul) = glUniform3uiv ul    uniform4v (UniformLocation ul) = glUniform4uiv ul --- GLfloat instance-instance UniformComponent CFloat where+instance UniformComponent GLfloat where    uniform1 (UniformLocation ul) = glUniform1f ul    uniform2 (UniformLocation ul) = glUniform2f ul    uniform3 (UniformLocation ul) = glUniform3f ul@@ -562,6 +558,19 @@    uniform2v (UniformLocation ul) = glUniform2fv ul    uniform3v (UniformLocation ul) = glUniform3fv ul    uniform4v (UniformLocation ul) = glUniform4fv ul++instance UniformComponent GLclampf where+   uniform1 (UniformLocation ul) x = glUniform1f ul (realToFrac x)+   uniform2 (UniformLocation ul) x y = glUniform2f ul (realToFrac x) (realToFrac y)+   uniform3 (UniformLocation ul) x y z = glUniform3f ul (realToFrac x) (realToFrac y) (realToFrac z)+   uniform4 (UniformLocation ul) x y z w = glUniform4f ul (realToFrac x) (realToFrac y) (realToFrac z) (realToFrac w)++   getUniform (Program p) (UniformLocation ul) = glGetUniformfv p ul . castPtr++   uniform1v (UniformLocation ul) n = glUniform1fv ul n . castPtr+   uniform2v (UniformLocation ul) n = glUniform2fv ul n . castPtr+   uniform3v (UniformLocation ul) n = glUniform3fv ul n . castPtr+   uniform4v (UniformLocation ul) n = glUniform4fv ul n . castPtr  -------------------------------------------------------------------------------- 
Graphics/Rendering/OpenGL/GL/StringQueries.hs view
@@ -8,61 +8,65 @@ -- Stability   :  stable -- Portability :  portable ----- This module corresponds to parts of section 6.1.11 (Pointer and String--- Queries) of the OpenGL 2.1 specs.+-- This module corresponds to parts of section 6.1.5 (String Queries) of the+-- OpenGL 3.2 specs. -- --------------------------------------------------------------------------------  module Graphics.Rendering.OpenGL.GL.StringQueries (-   vendor, renderer, glVersion, glExtensions, shadingLanguageVersion, majorMinor+   vendor, renderer, glVersion, glExtensions, shadingLanguageVersion,+   majorMinor, contextProfile ) where +import Data.Bits import Data.Char import Data.StateVar import Foreign.C.String import Foreign.Ptr import Graphics.Rendering.OpenGL.GL.QueryUtils-import Graphics.Rendering.OpenGL.Raw.Core31+import Graphics.Rendering.OpenGL.Raw.Core32  --------------------------------------------------------------------------------  vendor :: GettableStateVar String-vendor = makeGettableStateVar (getString Vendor)+vendor = makeGettableStateVar (getString gl_VENDOR)  renderer :: GettableStateVar String-renderer = makeGettableStateVar (getString Renderer)+renderer = makeGettableStateVar (getString gl_RENDERER)  glVersion :: GettableStateVar String-glVersion = makeGettableStateVar (getString Version)+glVersion = makeGettableStateVar (getString gl_VERSION)  glExtensions :: GettableStateVar [String]-glExtensions = makeGettableStateVar (fmap words $ getString Extensions)+glExtensions = makeGettableStateVar (fmap words $ getString gl_EXTENSIONS)  shadingLanguageVersion :: GettableStateVar String-shadingLanguageVersion = makeGettableStateVar (getString ShadingLanguageVersion)+shadingLanguageVersion = makeGettableStateVar (getString gl_SHADING_LANGUAGE_VERSION)  -------------------------------------------------------------------------------- -data StringName =-     Vendor-   | Renderer-   | Version-   | Extensions-   | ShadingLanguageVersion+data ContextProfile'+   = CoreProfile'+   | CompatibilityProfile'+   deriving ( Eq, Ord, Show ) -marshalStringName :: StringName -> GLenum-marshalStringName x = case x of-   Vendor -> gl_VENDOR-   Renderer -> gl_RENDERER-   Version -> gl_VERSION-   Extensions -> gl_EXTENSIONS-   ShadingLanguageVersion -> gl_SHADING_LANGUAGE_VERSION+marshalContextProfile' :: ContextProfile' -> GLenum+marshalContextProfile' x = case x of+   CoreProfile' -> gl_CONTEXT_CORE_PROFILE_BIT+   CompatibilityProfile' -> gl_CONTEXT_COMPATIBILITY_PROFILE_BIT +contextProfile :: GettableStateVar [ContextProfile']+contextProfile = makeGettableStateVar (getEnum1 i2cps GetContextProfileMask)++i2cps :: GLenum -> [ContextProfile']+i2cps bitfield =+   [ c | c <- [ CoreProfile', CompatibilityProfile' ]+       , (bitfield .&. marshalContextProfile' c) /= 0 ]+ -------------------------------------------------------------------------------- -getString :: StringName -> IO String-getString n = glGetString (marshalStringName n) >>=-              maybeNullPtr (return "") (peekCString . castPtr)+getString :: GLenum -> IO String+getString n = glGetString n >>= maybeNullPtr (return "") (peekCString . castPtr)  -------------------------------------------------------------------------------- 
Graphics/Rendering/OpenGL/GL/Texturing/Objects.hs view
@@ -55,7 +55,7 @@ textureBinding :: TextureTarget -> StateVar (Maybe TextureObject) textureBinding t =    makeStateVar-      (do o <- getEnum1 TextureObject (textureTargetToGetPName t)+      (do o <- getEnum1 (TextureObject . fromIntegral) (textureTargetToGetPName t)           return $ if o == defaultTextureObject then Nothing else Just o)       (glBindTexture (marshalTextureTarget t) . textureID . (maybe defaultTextureObject id)) @@ -95,7 +95,7 @@ type TexturePriority = GLclampf  texturePriority :: TextureTarget -> StateVar TexturePriority-texturePriority = texParamf id id TexturePriority+texturePriority = texParamf realToFrac realToFrac TexturePriority  prioritizeTextures :: [(TextureObject,TexturePriority)] -> IO () prioritizeTextures tps =
Graphics/Rendering/OpenGL/GL/Texturing/Parameters.hs view
@@ -226,7 +226,7 @@ --------------------------------------------------------------------------------  textureCompareFailValue :: TextureTarget -> StateVar GLclampf-textureCompareFailValue = texParamf id id TextureCompareFailValue+textureCompareFailValue = texParamf realToFrac realToFrac TextureCompareFailValue  -------------------------------------------------------------------------------- 
Graphics/Rendering/OpenGL/GL/VertexSpec.hs view
@@ -58,7 +58,6 @@  import Data.StateVar import Data.Tensor-import Foreign.C.Types import Foreign.Marshal.Array import Foreign.Ptr import Foreign.Storable@@ -117,8 +116,7 @@    vertex3v :: Ptr a -> IO ()    vertex4v :: Ptr a -> IO () --- GLshort instance-instance VertexComponent CShort where+instance VertexComponent GLshort where    vertex2 = glVertex2s    vertex3 = glVertex3s    vertex4 = glVertex4s@@ -127,8 +125,7 @@    vertex3v = glVertex3sv    vertex4v = glVertex4sv --- GLint instance-instance VertexComponent CInt where+instance VertexComponent GLint where    vertex2 = glVertex2i    vertex3 = glVertex3i    vertex4 = glVertex4i@@ -137,8 +134,7 @@    vertex3v = glVertex3iv    vertex4v = glVertex4iv --- GLfloat instance-instance VertexComponent CFloat where+instance VertexComponent GLfloat where    vertex2 = glVertex2f    vertex3 = glVertex3f    vertex4 = glVertex4f@@ -147,8 +143,7 @@    vertex3v = glVertex3fv    vertex4v = glVertex4fv --- GLdouble instance-instance VertexComponent CDouble where+instance VertexComponent GLdouble where    vertex2 = glVertex2d    vertex3 = glVertex3d    vertex4 = glVertex4d@@ -236,8 +231,7 @@    multiTexCoord3v :: GLenum -> Ptr a -> IO ()    multiTexCoord4v :: GLenum -> Ptr a -> IO () --- GLshort instance-instance TexCoordComponent CShort where+instance TexCoordComponent GLshort where    texCoord1 = glTexCoord1s    texCoord2 = glTexCoord2s    texCoord3 = glTexCoord3s@@ -258,8 +252,7 @@    multiTexCoord3v = glMultiTexCoord3sv    multiTexCoord4v = glMultiTexCoord4sv --- GLint instance-instance TexCoordComponent CInt where+instance TexCoordComponent GLint where    texCoord1 = glTexCoord1i    texCoord2 = glTexCoord2i    texCoord3 = glTexCoord3i@@ -280,8 +273,7 @@    multiTexCoord3v = glMultiTexCoord3iv    multiTexCoord4v = glMultiTexCoord4iv --- GLfloat instance-instance TexCoordComponent CFloat where+instance TexCoordComponent GLfloat where    texCoord1 = glTexCoord1f    texCoord2 = glTexCoord2f    texCoord3 = glTexCoord3f@@ -302,8 +294,7 @@    multiTexCoord3v = glMultiTexCoord3fv    multiTexCoord4v = glMultiTexCoord4fv --- GLdouble instance-instance TexCoordComponent CDouble where+instance TexCoordComponent GLdouble where    texCoord1 = glTexCoord1d    texCoord2 = glTexCoord2d    texCoord3 = glTexCoord3d@@ -383,28 +374,23 @@    normal3 :: a -> a -> a -> IO ()    normal3v :: Ptr a -> IO () --- GLbyte instance-instance NormalComponent CSChar where+instance NormalComponent GLbyte where    normal3 = glNormal3b    normal3v = glNormal3bv --- GLshort instance-instance NormalComponent CShort where+instance NormalComponent GLshort where    normal3 = glNormal3s    normal3v = glNormal3sv --- GLint instance-instance NormalComponent CInt where+instance NormalComponent GLint where    normal3 = glNormal3i    normal3v = glNormal3iv --- GLfloat instance-instance NormalComponent CFloat where+instance NormalComponent GLfloat where    normal3 = glNormal3f    normal3v = glNormal3fv --- GLdouble instance-instance NormalComponent CDouble where+instance NormalComponent GLdouble where    normal3 = glNormal3d    normal3v = glNormal3dv @@ -450,13 +436,11 @@    fogCoord1 :: a -> IO ()    fogCoord1v :: Ptr a -> IO () --- GLfloat instance-instance FogCoordComponent CFloat where+instance FogCoordComponent GLfloat where    fogCoord1 = glFogCoordf    fogCoord1v = glFogCoordfv --- GLdouble instance-instance FogCoordComponent CDouble where+instance FogCoordComponent GLdouble where    fogCoord1 = glFogCoordd    fogCoord1v = glFogCoorddv @@ -515,8 +499,7 @@    secondaryColor3  :: a -> a -> a -> IO ()    secondaryColor3v :: Ptr a -> IO () --- GLbyte instance-instance ColorComponent CSChar where+instance ColorComponent GLbyte where    color3 = glColor3b    color4 = glColor4b @@ -526,8 +509,7 @@    secondaryColor3 = glSecondaryColor3b    secondaryColor3v = glSecondaryColor3bv --- GLshort instance-instance ColorComponent CShort where+instance ColorComponent GLshort where    color3 = glColor3s    color4 = glColor4s @@ -537,8 +519,7 @@    secondaryColor3 = glSecondaryColor3s    secondaryColor3v = glSecondaryColor3sv --- GLint instance-instance ColorComponent CInt where+instance ColorComponent GLint where    color3 = glColor3i    color4 = glColor4i @@ -548,8 +529,7 @@    secondaryColor3 = glSecondaryColor3i    secondaryColor3v = glSecondaryColor3iv --- GLfloat instance-instance ColorComponent CFloat where+instance ColorComponent GLfloat where    color3 = glColor3f    color4 = glColor4f @@ -559,8 +539,17 @@    secondaryColor3 = glSecondaryColor3f    secondaryColor3v = glSecondaryColor3fv --- GLdouble instance-instance ColorComponent CDouble where+instance ColorComponent GLclampf where+   color3 r g b = glColor3f (realToFrac r) (realToFrac g) (realToFrac b)+   color4 r g b a = glColor4f (realToFrac r) (realToFrac g) (realToFrac b) (realToFrac a)++   color3v = glColor3fv . castPtr+   color4v = glColor4fv . castPtr++   secondaryColor3 r g b = glSecondaryColor3f (realToFrac r) (realToFrac g) (realToFrac b)+   secondaryColor3v = glSecondaryColor3fv . castPtr++instance ColorComponent GLdouble where    color3 = glColor3d    color4 = glColor4d @@ -570,8 +559,17 @@    secondaryColor3 = glSecondaryColor3d    secondaryColor3v = glSecondaryColor3dv --- GLubyte instance-instance ColorComponent CUChar where+instance ColorComponent GLclampd where+   color3 r g b = glColor3d (realToFrac r) (realToFrac g) (realToFrac b)+   color4 r g b a = glColor4d (realToFrac r) (realToFrac g) (realToFrac b) (realToFrac a)++   color3v = glColor3dv . castPtr+   color4v = glColor4dv . castPtr++   secondaryColor3 r g b = glSecondaryColor3d (realToFrac r) (realToFrac g) (realToFrac b)+   secondaryColor3v = glSecondaryColor3dv . castPtr++instance ColorComponent GLubyte where    color3 = glColor3ub    color4 = glColor4ub @@ -581,8 +579,7 @@    secondaryColor3 = glSecondaryColor3ub    secondaryColor3v = glSecondaryColor3ubv --- GLushort instance-instance ColorComponent CUShort where+instance ColorComponent GLushort where    color3 = glColor3us    color4 = glColor4us @@ -592,8 +589,7 @@    secondaryColor3 = glSecondaryColor3us    secondaryColor3v = glSecondaryColor3usv --- GLuint instance-instance ColorComponent CUInt where+instance ColorComponent GLuint where    color3 = glColor3ui    color4 = glColor4ui @@ -647,28 +643,23 @@    index1 :: a -> IO ()    index1v :: Ptr a -> IO () --- GLshort instance-instance IndexComponent CShort where+instance IndexComponent GLshort where    index1 = glIndexs    index1v = glIndexsv --- GLint instance-instance IndexComponent CInt where+instance IndexComponent GLint where    index1 = glIndexi    index1v = glIndexiv --- GLfloat instance-instance IndexComponent CFloat where+instance IndexComponent GLfloat where    index1 = glIndexf    index1v = glIndexfv --- GLdouble instance-instance IndexComponent CDouble where+instance IndexComponent GLdouble where    index1 = glIndexd    index1v = glIndexdv --- GLubyte instance-instance IndexComponent CUChar where+instance IndexComponent GLubyte where    index1 = glIndexub    index1v = glIndexubv @@ -784,21 +775,18 @@    vertexAttrib2Iv location = peek2M $ vertexAttrib2I location    vertexAttrib3Iv location = peek3M $ vertexAttrib3I location --- GLbyte instance-instance VertexAttribComponent CSChar where+instance VertexAttribComponent GLbyte where    vertexAttrib4v (AttribLocation al) = glVertexAttrib4bv al    vertexAttrib4Nv (AttribLocation al) = glVertexAttrib4Nbv al    vertexAttrib4Iv (AttribLocation al) = glVertexAttribI4bv al --- GLubyte instance-instance VertexAttribComponent CUChar where+instance VertexAttribComponent GLubyte where    vertexAttrib4N (AttribLocation al) = glVertexAttrib4Nub al    vertexAttrib4v (AttribLocation al) = glVertexAttrib4ubv al    vertexAttrib4Nv (AttribLocation al) = glVertexAttrib4Nubv al    vertexAttrib4Iv (AttribLocation al) = glVertexAttribI4ubv al --- GLshort instance-instance VertexAttribComponent CShort where+instance VertexAttribComponent GLshort where    vertexAttrib1 (AttribLocation al) = glVertexAttrib1s al    vertexAttrib2 (AttribLocation al) = glVertexAttrib2s al    vertexAttrib3 (AttribLocation al) = glVertexAttrib3s al@@ -813,14 +801,12 @@     vertexAttrib4Iv (AttribLocation al) = glVertexAttribI4sv al --- GLushort instance-instance VertexAttribComponent CUShort where+instance VertexAttribComponent GLushort where    vertexAttrib4v (AttribLocation al) = glVertexAttrib4usv al    vertexAttrib4Nv (AttribLocation al) = glVertexAttrib4Nusv al    vertexAttrib4Iv (AttribLocation al) = glVertexAttribI4usv al --- GLint instance-instance VertexAttribComponent CInt where+instance VertexAttribComponent GLint where    vertexAttrib1I (AttribLocation al) = glVertexAttribI1i al    vertexAttrib2I (AttribLocation al) = glVertexAttribI2i al    vertexAttrib3I (AttribLocation al) = glVertexAttribI3i al@@ -835,8 +821,7 @@    vertexAttrib3Iv (AttribLocation al) = glVertexAttribI3iv al    vertexAttrib4Iv (AttribLocation al) = glVertexAttribI4iv al --- GLuint instance-instance VertexAttribComponent CUInt where+instance VertexAttribComponent GLuint where    vertexAttrib1I (AttribLocation al) = glVertexAttribI1ui al    vertexAttrib2I (AttribLocation al) = glVertexAttribI2ui al    vertexAttrib3I (AttribLocation al) = glVertexAttribI3ui al@@ -851,8 +836,7 @@    vertexAttrib3Iv (AttribLocation al) = glVertexAttribI3uiv al    vertexAttrib4Iv (AttribLocation al) = glVertexAttribI4uiv al --- GLfloat instance-instance VertexAttribComponent CFloat where+instance VertexAttribComponent GLfloat where    vertexAttrib1 (AttribLocation al) = glVertexAttrib1f al    vertexAttrib2 (AttribLocation al) = glVertexAttrib2f al    vertexAttrib3 (AttribLocation al) = glVertexAttrib3f al@@ -867,6 +851,21 @@     vertexAttrib4Iv = vertexAttrib4IvRealFrac +instance VertexAttribComponent GLclampf where+   vertexAttrib1 (AttribLocation al) x = glVertexAttrib1f al (realToFrac x)+   vertexAttrib2 (AttribLocation al) x y = glVertexAttrib2f al (realToFrac x) (realToFrac y)+   vertexAttrib3 (AttribLocation al) x y z = glVertexAttrib3f al (realToFrac x) (realToFrac y) (realToFrac z)+   vertexAttrib4 (AttribLocation al) x y z w = glVertexAttrib4f al (realToFrac x) (realToFrac y) (realToFrac z) (realToFrac w)++   vertexAttrib1v (AttribLocation al) = glVertexAttrib1fv al . castPtr+   vertexAttrib2v (AttribLocation al) = glVertexAttrib2fv al . castPtr+   vertexAttrib3v (AttribLocation al) = glVertexAttrib3fv al . castPtr+   vertexAttrib4v (AttribLocation al) = glVertexAttrib4fv al . castPtr++   vertexAttrib4Nv = vertexAttrib4v++   vertexAttrib4Iv = vertexAttrib4IvRealFrac+ vertexAttrib4IvRealFrac :: (Storable a, RealFrac a) => AttribLocation -> Ptr a -> IO () vertexAttrib4IvRealFrac location = peek4M $ \x y z w ->    vertexAttrib4I location (toGLint x) (toGLint y) (toGLint z) (toGLint w)@@ -876,8 +875,7 @@ toGLint = truncate . (fromIntegral (maxBound :: GLint) *). clamp    where clamp = max (-1.0) . min 1.0 --- GLdouble instance-instance VertexAttribComponent CDouble where+instance VertexAttribComponent GLdouble where    vertexAttrib1 (AttribLocation al) = glVertexAttrib1d al    vertexAttrib2 (AttribLocation al) = glVertexAttrib2d al    vertexAttrib3 (AttribLocation al) = glVertexAttrib3d al@@ -887,6 +885,21 @@    vertexAttrib2v (AttribLocation al) = glVertexAttrib2dv al    vertexAttrib3v (AttribLocation al) = glVertexAttrib3dv al    vertexAttrib4v (AttribLocation al) = glVertexAttrib4dv al++   vertexAttrib4Nv = vertexAttrib4v++   vertexAttrib4Iv = vertexAttrib4IvRealFrac++instance VertexAttribComponent GLclampd where+   vertexAttrib1 (AttribLocation al) x = glVertexAttrib1d al (realToFrac x)+   vertexAttrib2 (AttribLocation al) x y = glVertexAttrib2d al (realToFrac x) (realToFrac y)+   vertexAttrib3 (AttribLocation al) x y z = glVertexAttrib3d al (realToFrac x) (realToFrac y) (realToFrac z)+   vertexAttrib4 (AttribLocation al) x y z w = glVertexAttrib4d al (realToFrac x) (realToFrac y) (realToFrac z) (realToFrac w)++   vertexAttrib1v (AttribLocation al) = glVertexAttrib1dv al . castPtr+   vertexAttrib2v (AttribLocation al) = glVertexAttrib2dv al . castPtr+   vertexAttrib3v (AttribLocation al) = glVertexAttrib3dv al . castPtr+   vertexAttrib4v (AttribLocation al) = glVertexAttrib4dv al . castPtr     vertexAttrib4Nv = vertexAttrib4v 
Graphics/Rendering/OpenGL/GLU/NURBS.hs view
@@ -277,7 +277,7 @@       (\(mv, proj, (Position x y, Size w h)) -> do           withMatrixColumnMajor mv $ \mvBuf ->              withMatrixColumnMajor proj $ \projBuf ->-                withArray [x, y, w, h] $ \viewportBuf ->+                withArray [x, y, fromIntegral w, fromIntegral h] $ \viewportBuf ->                   gluLoadSamplingMatrices nurbsObj mvBuf projBuf viewportBuf           setAutoLoadMatrix nurbsObj False) 
Graphics/Rendering/OpenGL/GLU/Tessellation.hs view
@@ -163,10 +163,10 @@ -- summing up to 1.0.  data WeightedProperties v-   = WeightedProperties (GLclampf, v)-                        (GLclampf, v)-                        (GLclampf, v)-                        (GLclampf, v)+   = WeightedProperties (GLfloat, v)+                        (GLfloat, v)+                        (GLfloat, v)+                        (GLfloat, v)    deriving ( Eq, Ord )  -- | A function combining given vertex properties into a property for a newly@@ -457,7 +457,7 @@ type CombineCallback v =       Ptr GLdouble    -> Ptr (Ptr (AnnotatedVertex v))-   -> Ptr GLclampf+   -> Ptr GLfloat    -> Ptr (Ptr (AnnotatedVertex v))    -> IO () 
OpenGL.cabal view
@@ -1,5 +1,5 @@ name: OpenGL-version: 2.3.0.0+version: 2.4.0.0 license: BSD3 license-file: LICENSE maintainer: Sven Panne <sven.panne@aedion.de>@@ -8,7 +8,7 @@ category: Graphics synopsis: A binding for the OpenGL graphics system description:-   A Haskell binding for the OpenGL graphics system (GL, version 2.1) and its+   A Haskell binding for the OpenGL graphics system (GL, version 3.2) and its    accompanying utility library (GLU, version 1.3).    .    OpenGL is the industry's most widely used and supported 2D and 3D graphics@@ -104,4 +104,4 @@    Graphics.Rendering.OpenGL.GLU.ErrorsInternal ghc-options: -Wall build-depends:-   base >= 3 && < 5, OpenGLRaw >= 1.0.1.0, GLURaw, StateVar, ObjectName, Tensor+   base >= 3 && < 5, OpenGLRaw >= 1.1.0.0, GLURaw >= 1.1.0.0, StateVar, ObjectName, Tensor