luminance 0.9.1 → 0.9.1.1
raw patch · 7 files changed
+15/−46 lines, 7 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Graphics.Luminance.Pixel: class ChannelSize c
- Graphics.Luminance.Pixel: class ChannelType t
Files
- CHANGELOG.md +10/−6
- luminance.cabal +1/−1
- src/Graphics/Luminance/Core/Pixel.hs +0/−29
- src/Graphics/Luminance/Core/RW.hs +2/−2
- src/Graphics/Luminance/Core/Shader/Program.hs +1/−1
- src/Graphics/Luminance/Core/Shader/Stage.hs +0/−4
- src/Graphics/Luminance/Pixel.hs +1/−3
CHANGELOG.md view
@@ -1,25 +1,29 @@-### 0.9.1+### 0.9.1.1 +- Several minor changes (clean up mostly).++## 0.9.1+ - Made `Program` an instance of `Eq` and `Show`. -## 0.9+# 0.9 - Dropped `gl32` for `gl33`. -### 0.8.2.1+## 0.8.2.1 - Removed the `MonadIO` constraint on `createGeometry` as it’s already brought by `MonadResource`. - Clean some code about `createGeometry` conditional (gl32 / gl45). -### 0.8.2+## 0.8.2 - Exposed `SomeUniformName`. -### 0.8.1+## 0.8.1 - Exposed `UniformName` – forgotten in 0.8 release. -## 0.8+# 0.8 #### Breaking changes
luminance.cabal view
@@ -1,5 +1,5 @@ name: luminance-version: 0.9.1+version: 0.9.1.1 synopsis: Type-safe, type-level and stateless graphics framework description: This package exposes several modules to work with /GPUs/ in a stateless and type-safe way. Currently, it uses OpenGL as backend hardware technology but
src/Graphics/Luminance/Core/Pixel.hs view
@@ -13,61 +13,35 @@ -- Portability : portable ----------------------------------------------------------------------------- --- FIXME: #13 module Graphics.Luminance.Core.Pixel where -import Data.Proxy ( Proxy(..) ) import Data.Word ( Word8 ) import Graphics.GL -------------------------------------------------------------------------------- -- Channel size ---------------------------------------------------------------- -class ChannelSize c where- channelSize :: (Num size) => proxy c -> size- -- |A 8-bit channel. data C8 = C8 deriving (Eq,Ord,Show) -instance ChannelSize C8 where- channelSize _ = 8- -- |A 16-bit channel. data C16 = C16 deriving (Eq,Ord,Show) -instance ChannelSize C16 where- channelSize _ = 16- -- |A 32-bit channel. data C32 = C32 deriving (Eq,Ord,Show) -instance ChannelSize C32 where- channelSize _ = 32- -------------------------------------------------------------------------------- -- Channel type ---------------------------------------------------------------- -class ChannelType t where- channelType :: proxy t -> GLenum- -- |Channels are integral values. data CInts = CInts deriving (Eq,Ord,Show) -instance ChannelType CInts where- channelType _ = GL_INT- -- |Channels are unsigned integral values. data CUInts = CUInts deriving (Eq,Ord,Show) -instance ChannelType CUInts where- channelType _ = GL_UNSIGNED_INT- -- |Channels are floating values. data CFloats = CFloats deriving (Eq,Ord,Show) -instance ChannelType CFloats where- channelType _ = GL_FLOAT- -------------------------------------------------------------------------------- -- Channel shape --------------------------------------------------------------- @@ -91,9 +65,6 @@ -- |A pixel format. data Format t c = Format deriving (Eq,Ord,Show)--instance (ChannelType t) => ChannelType (Format t c) where- channelType _ = channelType (Proxy :: Proxy t) type RGB8UI = Format CUInts (CRGB C8 C8 C8) type RGBA8UI = Format CUInts (CRGBA C8 C8 C8 C8)
src/Graphics/Luminance/Core/RW.hs view
@@ -17,12 +17,12 @@ class Writable w where -- |Read-only type.-data R = R deriving (Eq,Ord,Show)+data R = R deriving (Eq,Ord,Show) instance Readable R -- |Write-only type.-data W = W deriving (Eq,Ord,Show)+data W = W deriving (Eq,Ord,Show) instance Writable W
src/Graphics/Luminance/Core/Shader/Program.hs view
@@ -164,7 +164,7 @@ _ == _ = False instance Show SomeUniformName where- show (SomeUniformName n) = case n of+ show (SomeUniformName name) = case name of UniformName n -> "UniformName " ++ n UniformSemantic s -> "UniformSemantic " ++ show s UniformBlockName n -> "UniformBlockName " ++ n
src/Graphics/Luminance/Core/Shader/Stage.hs view
@@ -42,10 +42,6 @@ | FragmentShader deriving (Eq,Show) --- |Create a new tessellation control shader from a 'String' representation of its source code.-createTessCtrlShader :: (HasStageError e,MonadError e m,MonadIO m,MonadResource m) => String -> m Stage-createTessCtrlShader = mkShader GL_TESS_CONTROL_SHADER- -- |Create a shader stage from a 'String' representation of its source code and its type. -- -- Note: on some hardware and backends, /tessellation shaders/ aren’t available. That function
src/Graphics/Luminance/Pixel.hs view
@@ -10,12 +10,10 @@ module Graphics.Luminance.Pixel ( -- * Channel size- ChannelSize- , C8(..)+ C8(..) , C16(..) , C32(..) -- * Channel type- , ChannelType , CInts(..) , CUInts(..) , CFloats(..)